yrosseel / lavaan

an R package for structural equation modeling and more
http://lavaan.org
412 stars 99 forks source link

Request: SEM with long-data #283

Open akarlinsky opened 1 year ago

akarlinsky commented 1 year ago

In Stata, it's possible to fit SEM models with longitudinal data, making syntax much shorter (implicitly constraining coefficients to be identical across time of course). Making this possible in lavaan would be great! For example, instead of dem2 ~ dem1 dem3 ~ dem2 dem4 ~ dem3 dem5 ~ dem4 ...

we can write: dem ~ lag(dem)

which is much easier and less error-prone, especially if there are many time-periods.

yrosseel commented 11 months ago

Yes, I like this. This will not happen soon, but I will leave this issue open as a reminder.