Skip to content

Conditional Growth Curve with Missing Data Error in New Version #457

@sabainter

Description

@sabainter

I updated to the latest version of lavaan and a growth curve model that had previously run in version 0.6-19 now throws an error. In version 0.6-19 the warning messages about covariance coverage appear (missingness is by design), but the error is new in 0.6-20. The unconditional growth curve models run despite the missing data, but when conditioning the growth factors on exogenous predictors it throws the error. There is no missing data in the exogenous predictors.

I was able to reproduce the error with the Demo.growth dataset:

library(lavaan)

test<-Demo.growth[,]

#1st 200 observations have t4 observed but not t1, 2nd 200 have t1 not t4
test$t1[1:200]<-NA
test$t4[201:400]<-NA

#unconditional growth model
model_uc <- ' i =~ 1*t1 + 1*t2 + 1*t3 + 1*t4
           s =~ 0*t1 + 1*t2 + 2*t3 + 3*t4 '
#conditional growth model
model_c <- ' i =~ 1*t1 + 1*t2 + 1*t3 + 1*t4
           s =~ 0*t1 + 1*t2 + 2*t3 + 3*t4 
           i ~ c1
           s ~ c1'

# Unconditional gives coverage warning, no error
fit_uc <- growth(model_uc, data=test, missing = "FIML")
summary(fit_uc)

# conditional model gives error and warning
fit_c <- growth(model_c, data=test, missing = "FIML")

Thank you for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions