Hi everyone,
we're fresh students dealing with R and we got some questions about lavaan package, using it to build a measurement model in CFA.
one of our factor loadings resulted to be more then 1 and we want to solve this.
look at the line between ABAS to Autistic profile in the picture (1.08)the code we used is:
mod_meas <- '
## latent variable definitions (CFA)
Accomp_Symp =~ b1 * Sensory + b2 * Sleep_Disturbance + b3 * Stereotypic_Behavior
Autistic_Profile =~ b4 *ABAS + b5 * Cognitive + b6 * ADOS
## covariances
Accomp_Symp ~~ Autistic_Profile
## errors
Sensory ~~ e1 * Sensory
Sleep_Disturbance ~~ e2 * Sleep_Disturbance
Stereotypic_Behavior ~~ e3 * Stereotypic_Behavior
ABAS ~~ e4 * ABAS
Cognitive ~~ e5 * Cognitive
ADOS ~~ e6 * ADOS
'
fit_meas <- cfa(mod_meas, data = data)
lay <- get_layout(
"Sensory",NA,"Sleep_Disturbance",NA, "Stereotypic_Behavior", NA,NA, "ABAS",NA, "Cognitive",NA, "ADOS",
NA, NA, NA, "Accomp_Symp", NA, NA, NA, NA, NA, "Autistic_Profile", NA, NA,
rows = 2
)
prepare_graph(fit_meas,layout = lay, angle = 30) %>%
edit_edges((label= est_sig_std)) %>%
plot()
Thanks in advance,
Yuval