Unexpected syntax outcome

40 views
Skip to first unread message

Edward Rigdon

unread,
Dec 16, 2015, 8:27:44 PM12/16/15
to lav...@googlegroups.com
     I thought I had a pretty good grip on lavaan defaults, but a student produced some examples where the results surprised me.  Two models are the same except for the structural model.  Model 1 is specified as:


CQmodel1 <-

# factor to indicator

  'MCQ =~ MCQ1 + MCQ2 + MCQ3 + MCQ4

CCQ =~ CCQ1 + CCQ2 + CCQ3 + CCQ4 + CCQ5 + CCQ6

TCQ =~ TCQ1 + TCQ2 + TCQ3 + TCQ4 + TCQ5

BCQ =~ BCQ1 + BCQ2 + BCQ3 + BCQ4 + BCQ5

SE =~ SE1 + SE2 + SE3 + SE4 + SE5 + SE6 + SE7 + SE8

SP =~ SP1 + SP2 + SP3 + SP4 + SP5 + SP6 + SP7 + SP8

# factor to factor

BCQ ~ MCQ + TCQ

CCQ ~ MCQ + TCQ

MCQ ~ SE

TCQ ~ SE

SE ~ SP'


and Model 5 is specified as:


CQmodel5 <-

# factor to factor

  'MCQ =~ MCQ1 + MCQ2 + MCQ3 + MCQ4

CCQ =~ CCQ1 + CCQ2 + CCQ3 + CCQ4 + CCQ5 + CCQ6

TCQ =~ TCQ1 + TCQ2 + TCQ3 + TCQ4 + TCQ5

BCQ =~ BCQ1 + BCQ2 + BCQ3 + BCQ4 + BCQ5

SE =~ SE1 + SE2 + SE3 + SE4 + SE5 + SE6 + SE7 + SE8

SP =~ SP1 + SP2 + SP3 + SP4 + SP5 + SP6 + SP7 + SP8

# factor to factor

MCQ ~ TCQ

TCQ ~ SE

CCQ ~ TCQ

BCQ ~ TCQ

SE ~ SP'


Unexpectedly, when these models were estimated, there were free residual covariances between the ultimate outcome factors in each model--between BCQ and CCQ in Model 1 and between MCQ, CCQ and BCQ in Model 5.  That seems like very strange behavior to me.

Have I missed something from the tutorials?

--Ed Rigdon

yrosseel

unread,
Dec 17, 2015, 3:05:42 AM12/17/15
to lav...@googlegroups.com
On 12/17/2015 02:27 AM, Edward Rigdon wrote:
> # factor to factor
>
> MCQ ~ TCQ
> TCQ ~ SE
> CCQ ~ TCQ
> BCQ ~ TCQ
> SE ~ SP'
>
> Unexpectedly, when these models were estimated, there were free residual
> covariances between the ultimate outcome factors in each model--between
> BCQ and CCQ in Model 1 and between MCQ, CCQ and BCQ in Model 5. That
> seems like very strange behavior to me.

This (default) behavior certainly is as intended. Residuals between
outcome variables (either latent or observed) are -per default- always
correlated. In the defaults-avoiding lavaan() function, this is
controlled by the auto.cov.y= argument (see table 3 in the JSS paper).

You can always 'identify' those outcome variables as follows:

> PT <- lavaanify(CQmodel5, auto = TRUE)
> lavNames(PT, "lv.y")
[1] "MCQ" "CCQ" "BCQ"

(and using "ov.y" for the observed ones).

I believe most multivariate software behaves like this (by default),
including Mplus. The idea is just like in multivariate regression: we do
not -by default- impose a structure on the residuals of outcome
variables. We assume their covariance structure is unstructured, unless
we have theoretical reasons to impose another structure (eg compound
symmetry or AR(1) if the outcomes are repeated measures).

If you are using the sem/cfa function, and you wish to override this,
you need to do this in the syntax, by adding lines like

MCQ ~~ 0*CCQ

if you prefer a zero residual covariance.

Yves.


Edward Rigdon

unread,
Dec 17, 2015, 9:44:02 AM12/17/15
to lav...@googlegroups.com
Yves--
     Thank you for your reply.  Perhaps I have only seen models with a single terminal outcome factor.  Or perhaps I am still thinking in LISREL terms.  That package leaned toward a PSI matrix where off-diagonal elements all started fixed to 0, inclining toward a recursive structural model.  In any event,I am glad to learn better.  I will pass this along to my students.
--Ed Rigdon




--
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 https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.

Mark Seeto

unread,
Dec 17, 2015, 3:55:50 PM12/17/15
to lavaan
I've sometimes wondered about these covariances between error terms too. In Ed's model 1, why is a covariance between the error terms of MCQ and TCQ not included? Does it not make sense to include that covariance?

yrosseel

unread,
Dec 17, 2015, 5:47:22 PM12/17/15
to lav...@googlegroups.com
MCQ and TCQ are mediators. They sit in the middle. Only for 'pure'
outcome variables (the output of lavNames(fit, "lv.y")) do we -per
default- add residual covariances. On the other hand, 'pure' exogenous
variables (the output of lavNames(fit, "lv.x")) are also correlated by
default. Residual covariances between mediators can be sensible, but the
user will have to add those by hand.

Yves.

Mark Seeto

unread,
Dec 18, 2015, 1:20:39 AM12/18/15
to lavaan
Thanks for your reply Yves.
Reply all
Reply to author
Forward
0 new messages