
Last chance! 50% off unlimited learning
Sale ends in
# Generate factor data
two_factor <- simulate_factors(
factors = 2, # factors = 2
variables = 6, # variables per factor = 6
loadings = 0.55, # loadings between = 0.45 to 0.65
cross_loadings = 0.05, # cross-loadings N(0, 0.05)
correlations = 0.30, # correlation between factors = 0.30
sample_size = 1000 # number of cases = 1000
)
# Add small population error using Cudeck method
two_factor_Cudeck <- add_population_error(
lf_object = two_factor,
cfa_method = "minres",
fit = "rmsr", misfit = "close",
error_method = "cudeck"
)
# Add small population error using Yuan method
two_factor_Yuan <- add_population_error(
lf_object = two_factor,
cfa_method = "minres",
fit = "rmsr", misfit = "close",
error_method = "yuan"
)
Run the code above in your browser using DataLab