Cross lagged panel analysis path diagram syntax

1,360 views
Skip to first unread message

Ashenafi Kassahun

unread,
Feb 24, 2015, 12:46:24 PM2/24/15
to lav...@googlegroups.com
Hi, would you suggest syntax for path diagram for cross lagged panel analysis? I want output like mplus.

Best,
Ashenafi

Jeremy Miles

unread,
Feb 24, 2015, 2:02:23 PM2/24/15
to lav...@googlegroups.com
You have two variables, x and y, measured at two time points:

mod.cl <- "
x2 ~ x1 + y1
y2 ~ x1 + y1

y2 ~~ y1
x2 ~~ x2
"

fit.cl <- sem(mod.cl, data=myData)
summary(fit.cl)

(Note, untested code).

Jeremy
> --
> 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.
> To post to this group, send email to lav...@googlegroups.com.
> Visit this group at http://groups.google.com/group/lavaan.
> For more options, visit https://groups.google.com/d/optout.

Ashenafi Kassahun

unread,
Feb 25, 2015, 5:27:05 AM2/25/15
to lav...@googlegroups.com
Dear Jeremy,

Thank you for the prompt response. I think I didn't clearly described by question. I have cross lagged model like you specified it above but my semplot output doesn't look like the result in mplus. I mean the two variables are not parallel depicted in the diagram. Would you suggest me the syntax for the plot?

Best regards,
Ashenafi

Jeremy Miles

unread,
Feb 25, 2015, 12:11:07 PM2/25/15
to lav...@googlegroups.com
Hi Ashenafi,

I'm not sure, I don't use Semplot. And are you talking about the path diagram produced by Mplus? I very rarely use that. I don't find the diagrams produced by programs to be especially useful - I draw my own. 

Perhaps you could link a picture, so we understand the issue?

Jeremy



Ashenafi Kassahun

unread,
Feb 26, 2015, 1:35:09 AM2/26/15
to lav...@googlegroups.com

Ashenafi Kassahun

unread,
Feb 26, 2015, 1:41:10 AM2/26/15
to lav...@googlegroups.com
Ps. Dear Jermey, it will be great if you post example of your own syntax. 

Ashenafi

Jeremy Miles

unread,
Feb 26, 2015, 11:40:11 AM2/26/15
to lav...@googlegroups.com

Ashenafi,

I think that getting a diagram like that out of a program automatically would be very, very hard. That image does not show residual variances, residual covariances (which I presume are there) , means, intercepts, measured variables, measured variable loadings, etc. But sometimes you want to show those.

I use PowerPoint to draw my path diagrams and I keep one large file with every path diagram I have drawn since I started doing SEM (just over 20 years ago?!).  When I want a path diagram, i look through it for the one that is most similar to what I want, and I adapt it. You are welcome to use my file, you can find it here: https://dl.dropboxusercontent.com/u/24381951/PATH%20DIAGRAMS2.pptx  The diagram on slide 124 might be close to what you want. 20 also has the indicator variables and residual variances. 

(Also, when I send this to people I usually have some sort of disclaimer that it's not necessarily the case that any diagram is meaningful or true. Some I drew to make a point, some i got bored before I finished, some I made mistakes.)

Jeremy




Ashenafi Kassahun

unread,
Feb 26, 2015, 12:31:01 PM2/26/15
to lav...@googlegroups.com
Dear Jeremy, 

Thank you so much for the help. One of the pictures will definitely fit to your wonderfully plotted path diagrams. I really appreciate your help. I can see how experienced in SEM you are. 

Cheers,
Ashenafi

mike.wayn...@gmail.com

unread,
Aug 13, 2015, 8:33:11 PM8/13/15
to lavaan
Ran across this so I thought I'd share!
clpm.R
clpm3.pdf

David Morris

unread,
Sep 16, 2016, 3:18:21 PM9/16/16
to lavaan, mike.wayn...@gmail.com
Hi Mike - I was looking over your code, and I'm not sure I understand what you are doing with the "rnorm" commands. I can't get it to work on R, and I'm not sure I follow conceptually. Thanks for the example!
Reply all
Reply to author
Forward
0 new messages