rating_data <- HEXACO_example_data
cfa_model <- paste0("H =~ ", paste0("SS", seq(6,60,6), collapse = " + "), "\n",
"E =~ ", paste0("SS", seq(5,60,6), collapse = " + "), "\n",
"X =~ ", paste0("SS", seq(4,60,6), collapse = " + "), "\n",
"A =~ ", paste0("SS", seq(3,60,6), collapse = " + "), "\n",
"C =~ ", paste0("SS", seq(2,60,6), collapse = " + "), "\n",
"O =~ ", paste0("SS", seq(1,60,6), collapse = " + "), "\n")
cfa_estimates <- get_CFA_estimates(response_data = rating_data,
fit_model = cfa_model,
item_names = paste0("SS",c(1:60)))
cfa_matrices <- get_simulation_matrices(loadings = cfa_estimates$loadings,
intercepts = cfa_estimates$intercepts,
residuals = cfa_estimates$residuals,
covariances = cfa_estimates$covariances,
N = 100, N_items = 60, N_dims = 6,
dim_names = c("H", "E", "X", "A", "C", "O"),
empirical = TRUE)
Run the code above in your browser using DataLab