lavaan versus lisrel

450 views
Skip to first unread message

Yolande

unread,
May 9, 2014, 11:47:45 AM5/9/14
to lav...@googlegroups.com
Hi,

I run SEM using LISREL and R (lavaan). The standardized parameter estimates for endogenous variables were similar. However, they were totally different for exogenous variables and the difference affected the regression coefficients. What part of the syntax I need to look at to make sure I am using the same model and get the same estimate. If someone had the same issue before, I appreciate your help.

Thanks.

Yolande Tra

unread,
May 9, 2014, 3:16:17 PM5/9/14
to lav...@googlegroups.com
Hi,
I have a nominal exogenous variable with 4 categories. Here is my syntax, where I got a warning. The example in the tutorial says to create 3 dummy variables. I used contrast for dummy coding
http://lavaan.ugent.be/tutorial/cat.html

skeptic$INFOH<-factor(skeptic$INFOH)
contrasts(skeptic$INFOH)<-contr.treatment(4)
fit <- sem(model, data = skeptic, orthogonal=TRUE,ordered=skeptic$INFOH)

Warning message:
In lav_data_full(data = data, group = group, group.label = group.label,  :
  lavaan WARNING: unordered factor(s) with more than 2 levels detected in data: INFOH

I appreciate any help.
Thanks,


--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/7DIIqLBGl3E/unsubscribe.
To unsubscribe from this group and all its topics, 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.

yrosseel

unread,
May 10, 2014, 6:09:16 AM5/10/14
to lav...@googlegroups.com
On 05/09/2014 05:47 PM, Yolande wrote:
> Hi,
>
> I run SEM using LISREL and R (lavaan). The standardized parameter
> estimates for endogenous variables were similar. However, they were
> totally different for exogenous variables and the difference affected
> the regression coefficients.

Can you show us the LISREL output, together with the lavaan script + output?

Yves.


yrosseel

unread,
May 10, 2014, 6:12:56 AM5/10/14
to lav...@googlegroups.com
On 05/09/2014 09:16 PM, Yolande Tra wrote:
> Hi,
> I have a nominal exogenous variable with 4 categories. Here is my
> syntax, where I got a warning. The example in the tutorial says to
> create 3 dummy variables. I used contrast for dummy coding
> http://lavaan.ugent.be/tutorial/cat.html
>
> skeptic$INFOH<-factor(skeptic$INFOH)
> contrasts(skeptic$INFOH)<-contr.treatment(4)

lavaan (0.5) does NOT automatically expand a factor into a set of dummy
variables (unlike, say lm() and glm()). You need to construct the dummy
variables yourself (say, INFOH1, INFOH2 and INFOH3), and then you can
use those three exogenous dummy variables in your model syntax.

Yves.

Yolande Tra

unread,
May 21, 2014, 8:25:14 PM5/21/14
to lav...@googlegroups.com
Attached is the LISREL and the lavaan script + output

Thanks.


--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/7DIIqLBGl3E/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+unsubscribe@googlegroups.com.
LISREL_RUN.txt
sem(1).R
Summary fit.txt

yrosseel

unread,
May 26, 2014, 11:44:34 AM5/26/14
to lav...@googlegroups.com
On 05/22/2014 02:25 AM, Yolande Tra wrote:
> Attached is the LISREL and the lavaan script + output

Thanks. It looks like you analyzed a correlation matrix in LISREL, while
lavaan uses a covariance matrix. In lavaan, you can use std.ov=TRUE, to
mimic the LISREL results. (Although it would be better to feed LISREL a
covariance matrix, instead of a correlation matrix).

Yves.

Yolande Tra

unread,
May 26, 2014, 1:41:24 PM5/26/14
to lav...@googlegroups.com
Thanks.




Yves.

Reply all
Reply to author
Forward
0 new messages