# decent growth model fit but negative variance error

28 views

### Brie M

Dec 8, 2018, 6:40:28 PM12/8/18
to lavaan
Hi all,

I am working on a relatively simple growth model:

`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)`

And I get an acceptable fit but also this error message:
`lavaan WARNING: some estimated ov variances are negative`

With a weird negative variance for BMI z-score at 10y:
`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`

It's literally growth data on a cohort of kids, and it should be pretty straightforward (though there was an obesity crisis happening in the middle of it...). Is there a way to fit a model here without negative variance?  I've attached data and also screenshots of individual growth curves (n=600) in case that is helpful/mildly interesting.

Thanks for your help!

data_lavaan.sav
Screen Shot 2018-12-07 at 4.36.30 PM.png
Screen Shot 2018-12-07 at 4.37.00 PM.png
Screen Shot 2018-12-07 at 4.37.50 PM.png
Screen Shot 2018-12-07 at 4.39.50 PM.png
Screen Shot 2018-12-07 at 4.46.12 PM.png
Screen Shot 2018-12-07 at 4.47.30 PM.png