Plotting model implied curve

52 views
Skip to first unread message

Rogier Kievit

unread,
Mar 24, 2026, 12:08:01 PM (11 days ago) Mar 24
to lavaan
Hello all - I'm wondering if there are any automated approaches to plot the model implied curves (i.e. values for each person at each wave) in a growth model? I know I can use the predict() implied slopes and factor loadings to construct them myself, but I'm teaching lavaan to emerging lavaan users, so it would be nice if there already exists a slightly less laborious (and error prone) approach.

Rogier Kievit

unread,
Mar 25, 2026, 9:21:47 AM (11 days ago) Mar 25
to lavaan
I think this should be a relatively general solution, doing some robustness checks

model_lin <- ' i =~ 1*t1 + 1*t2 + 1*t3 + 1*t4
           s =~ 0*t1 + 1*t2 + 2*t3 + 3*t4 '
fitlin <- growth(model_lin, data=Demo.growth)
summary(fitlin)

mod_loadings_lin<-fitlin@Model@GLIST$lambda
factorscores_lin<-as.matrix(predict(fitlin))
new_growthdat_pred_linear<-t(mod_loadings%*%t(factorscores_lin))



Yves Rosseel

unread,
Mar 25, 2026, 10:51:55 AM (11 days ago) Mar 25
to lav...@googlegroups.com
I think you are looking for lavPredict(fitlin, type = "ov")

Yves.
> --
> You received this message because you are subscribed to the Google
> Groups "lavaan" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to lavaan+un...@googlegroups.com
> <mailto:lavaan+un...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/lavaan/
> b659833f-1ae5-4739-8f45-bfc7e643002cn%40googlegroups.com <https://
> groups.google.com/d/msgid/lavaan/b659833f-1ae5-4739-8f45-
> bfc7e643002cn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Rogier Kievit

unread,
Mar 25, 2026, 3:25:31 PM (10 days ago) Mar 25
to lavaan
Thank you, I thought it would already exist but hadn't yet found this function

Terrence Jorgensen

unread,
Mar 26, 2026, 5:14:07 AM (10 days ago) Mar 26
to lavaan

I think you are looking for lavPredict(fitlin, type = "ov")

Is lavPredictY() also well suited for this?

Terrence D. Jorgensen    (he, him, his)
Assistant Professor, Methods and Statistics
Research Institute for Child Development and Education, the University of Amsterdam
http://www.uva.nl/profile/t.d.jorgensen

 
Reply all
Reply to author
Forward
0 new messages