- Examples of the factor-analysis functions
(
EFA_modern(), EFA_plot(),
Standardized_solutions(),
Standardized_solutions_cfa(), multi_cfa(),
fit_index_Table(), plot_multi_sem(),
combine_likert_sem(), safe_cfa(),
cor_afe(), extract_fit(),
factor_summary() and the boot_cfa*() /
boot_efa*() families) now simulate Likert items from
correlated latent factors. They used independent
sample(1:5) draws, so the models had no common factor and
could fail to converge on some platforms: the EFA_plot()
example stopped with “fit measures not available if model did not
converge” in the CRAN donttest check.
- Version 1.2.3 was submitted to CRAN but withdrawn before review; its
changes are included here.
New features
- New
run_sempowerlab(): launches the SemPowerLab Shiny
application, which plans the sample size of a predictive design with
latent variables (two correlated latent predictors and a latent
criterion) by wrapping
semPower::semPower.powerRegression(). It draws the model,
plots the power curve, crosses the effect with the average factor
loading, and writes the reproducible script and a draft of the
Participants section. The application moves here from the InterconectaR
package. shiny, bslib and
semPower added to Suggests.
- The application passes the criterion as the first factor, as
semPower expects, and every output (cards, curve, script and paragraph)
follows the specification that produced the result rather than inputs
edited afterwards.
Bug fixes
boot_cfa() now returns the scaled
(robust) fit indices when the model is fitted with a robust
test statistic. Since lavaan 0.6-14 the test option is a
vector (c("standard", "scaled.shifted") for WLSMV), and the
internal helpers is_robust_estimator_lavaan() and
lavaan_estimator() inspected only its first element. That
element is always "standard", so every robust fit was
classified as non-robust and fit_measures1 carried
cfi, tli and rmsea instead of
cfi.scaled, tli.scaled and
rmsea.scaled. With ordinal data the gap is not cosmetic: in
a 23-item five-factor model the reported CFI was .988 against a true
robust value of .947, which made the bootstrap figure contradict the fit
table. Both helpers now test every declared statistic with
any(test_types %in% ...), the same way
boot_efa() already did. As a side effect the
estimator column now reports WLSMV instead of
DWLS_variant.
- The column names keep their current form (
CFI,
TLI, RMSEA, …) so the plotting functions
boot_cfa_plot(), boot_cfa_plot_enhanced(),
boot_cfa_density(), boot_cfa_raincloud() and
calculate_per_fit() are unaffected; only the values
change.
CRAN fixes
- The PDF manual now builds without LaTeX errors: the Unicode symbols
>=, <=, -> and
R^2 are written in portable form in the documentation of
boot_cfa_plot_enhanced(),
plot_mediation_chord(),
plot_mediation_donuts() and
plot_path_mediation(). This was the error that caused the
1.2.0 submission to be archived by CRAN.
DESCRIPTION now declares R (>= 4.1.0),
required by the use of the native pipe |> / lambda
\(...) syntax in invertir_items() and
split_data_stratified_clustered().
Improvements
plot_path_cfa() rewritten: latent variables as circles,
observed variables as rectangles, fan-out arrows, black-and-white
default.
Improvements
plot_multi_sem() now supports multi-row panel layouts
via the new nrow and ncol arguments. By
default it keeps the previous behaviour (a single row with one column
per model); when a grid is requested, leftover cells are left blank.
Saved-figure dimensions scale with the grid (width_per per
column, height per row).
Features
Data Preprocessing
filtrar_aberrantes() - Filter aberrant response
patterns using Mahalanobis distance
invertir_items() - Reverse score items
split_data_two() / split_data_three() -
Split data for cross-validation
smote_multiclass() - SMOTE oversampling for imbalanced
multiclass data
Exploratory Factor Analysis
(EFA)
EFA_modern() - Modern EFA with multiple rotation
options
EFA_plot() - Visualize factor loadings
Standardized_solutions() - Extract standardized EFA
solutions
boot_efa() - Bootstrap EFA for stability analysis
efa_with_bootstrap() - EFA with bootstrap
resampling
Confirmatory Factor Analysis
(CFA)
multi_cfa() - Fit multiple CFA models
Standardized_solutions_cfa() - Extract standardized CFA
solutions
boot_cfa() - Bootstrap CFA for stability analysis
boot_cfa_stability() - CFA stability across sample
sizes
Measurement Invariance
easy_invariance() - Measurement invariance analysis
with ordinal data following Wu and Estabrook (2016)
Visualization
Plot_Likert() / Plot_Likert2() - Likert
scale visualizations
boot_cfa_plot() - Bootstrap CFA results
visualization
boot_cfa_density() - Bootstrap distribution density
plots
boot_cfa_raincloud() - Raincloud plot
visualizations
boot_efa_plot() / boot_efa_forest_plot() -
Bootstrap EFA visualizations
plot_cfa_stability() family - CFA stability
visualizations
Reliability
calcula_omega_mcdonald() - McDonald’s omega
coefficient
Utilities
save_to_excel_table() - Export results to Excel
create_groups() - Create item groups for factor
definitions
- Model syntax generators for lavaan