latent growth curve modeling - lavaan

40 views
Skip to first unread message

rothmi...@hotmail.com

unread,
Feb 5, 2019, 4:50:29 PM2/5/19
to lavaan
Hey there :-)

I`m about to write my masterthesis in psychology.. I have longitudinal data (4 timepoints) and therefore want to make latent growth curve modeling. Is anyone familiar with these models?
I`ve been trying to build them up but the fit is incredibly bad and I don`t know what I`m doing wrong :(((

Anyone willing to help?

thanks a lot!
Michelle

rothmi...@hotmail.com

unread,
Feb 5, 2019, 5:08:39 PM2/5/19
to lavaan
this is my code:

modell1 <- "

                Apz =~ (lam1)*acsi01.1 + (lam2)*acsi05.1 + (lam3)*acsi07.1 + (lam4)*acsi10.1
                Cpz =~ (lam1)*ccsi01.1 + (lam2)*ccsi05.1 + (lam3)*ccsi07.1 + (lam4)*ccsi10.1
                Hpz =~ (lam1)*hcsi01.1 + (lam2)*hcsi05.1 + (lam3)*hcsi07.1 + (lam4)*hcsi10.1
                Ipz =~ (lam1)*icsi01.1 + (lam2)*icsi05.1 + (lam3)*icsi07.1 + (lam4)*icsi10.1

                int =~ 1*Apz + 1*Cpz + 1*Hpz + 1*Ipz
                s =~ 0*Apz + 15*Cpz + 27*HPz + 53*IPz


#intercepts
                acsi01.1 ~ (alp1)*1; ccsi01.1 ~ (alp1)*1; hcsi01.1 ~ (alp1)*1; icsi01.1 ~(alp1)*1
                acsi05.1 ~ (alp2)*1; ccsi05.1 ~ (alp2)*1; hcsi05.1 ~ (alp2)*1; icsi05.1 ~ (alp2)*1
                acsi07.1 ~ (alp3)*1; ccsi07.1 ~ (alp3)*1; hcsi07.1 ~ (alp3)*1; icsi07.1 ~ (alp3)*1
                acsi10.1 ~ (alp4)*1; ccsi10.1 ~ (alp4)*1; hcsi10.1 ~ (alp4)*1; icsi10.1 ~ (alp4)*1

#residual variances
                acsi01.1 ~~ r*acsi01.1
                ccsi01.1 ~~ r*ccsi01.1
                hcsi01.1 ~~ r*hcsi01.1
                icsi01.1 ~~ r*icsi01.1
               
                acsi05.1 ~~ r*acsi05.1
                ccsi05.1 ~~ r*ccsi05.1
                hcsi05.1 ~~ r*hcsi05.1
                icsi05.1 ~~ r*icsi05.1
               
                acsi07.1 ~~ r*acsi07.1
                ccsi07.1 ~~ r*ccsi07.1
                hcsi07.1 ~~ r*hcsi07.1
                icsi07.1 ~~ r*icsi07.1
               
                acsi10.1 ~~ r*acsi10.1
                ccsi10.1 ~~ r*ccsi10.1
                hcsi10.1 ~~ r*hcsi10.1
                icsi10.1 ~~ r*icsi10.1"


modell1_fit <- sem(modell1, newmydata, missing="fiml", estimator="mlr")
summary(modell1_fit, fit=TRUE)


I don`t really understand what and why I have to constrain or not..

Terrence Jorgensen

unread,
Feb 6, 2019, 9:43:57 AM2/6/19
to lavaan
I don`t really understand what and why I have to constrain or not.



Terrence D. Jorgensen
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam

rothmi...@hotmail.com

unread,
Feb 11, 2019, 5:18:32 AM2/11/19
to lavaan
Dear Terrence

thank you so much! These sources really helped me a lot! I do have a model now whose fit is quite good! I`m trying to incorporate covariates now (first time invariant, later on time varying ones). Do you have some reading/tutorial requests on that (with R code)?

best regards & thank you a lot
Michelle

Terrence Jorgensen

unread,
Feb 19, 2019, 2:49:34 PM2/19/19
to lavaan
Do you have some reading/tutorial requests on that (with R code)?
Reply all
Reply to author
Forward
0 new messages