mod1 <- ' # intercept and slope with fixed coefficients i =~ 1*baz12 + 1*baz5y + 1*baz10y s =~ 0*baz12 + 5*baz5y + 10*baz10y
log_hs_crp ~ s + i + A_age + sex + iron_supps ~ sex
# residual variancesbaz12 ~~ baz12baz5y ~~ baz5ybaz10y ~~ baz10y'
fit1 <- growth(mod1, data = data_lavaan, missing="FIML")summary(fit1, standardize = T, fit.measures = T)
lavaan WARNING: some estimated ov variances are negative
Variances: Estimate Std.Err z-value P(>|z|) Std.lv Std.all .baz12 0.567 0.052 10.873 0.000 0.567 0.642 .baz5y 0.680 0.050 13.501 0.000 0.680 0.505 .baz10y -0.343 0.079 -4.337 0.000 -0.343 -0.250 .log_hs_crp 2.559 0.148 17.247 0.000 2.559 0.932 .i 0.316 0.044 7.105 0.000 1.000 1.000 .s 0.014 0.001 10.949 0.000 0.995 0.995