How do we decide which variances/covariances to specify in a SEM model?

36 views
Skip to first unread message

Tamanna Mostafa

unread,
Jan 21, 2019, 2:18:57 PM1/21/19
to lavaan
In SEM models, we need to specify residual covariances. How do we decide which variances/covariances to specify?

Edward Rigdon

unread,
Jan 21, 2019, 2:32:53 PM1/21/19
to lav...@googlegroups.com
     Every variable has a variance attached.  If something does not have a variance, then it is a constant.  If the variable is dependent, then it ihas a residual variance--otherwise, the parameter is its total variance. These variances or residual variances exist, but some functions ("cfa", "sem") specify them as free parameter by default, if the specified model would be statistically identified. The "lavaan" function does not specify variances as free parameters by default, though you can access defaults from that starting point.
     If an observed variable is a covariate--not dependent on anything else in the model--then technically its variance and covariances are outside the model and are not specified. The variance and covariances of covariates are taken directly from the data, rather than being estimated.
     If something has no residual variance, then it is perfectly predicted--but you may have to specify that 0 residual variance. If a free variance or residual variance would not be statistically identified, the "cfa" and "sem" functions by default will fix the estimate to 0. If you prefer a different fixed value, you must set it yourself.

On Mon, Jan 21, 2019 at 2:18 PM Tamanna Mostafa <tmost...@gmail.com> wrote:
In SEM models, we need to specify residual covariances. How do we decide which variances/covariances to specify?

--
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.

Tamanna Mostafa

unread,
Jan 21, 2019, 3:27:50 PM1/21/19
to lavaan
Thank you for your answer. I'm posting a R code (that I did not write but am trying to understand) here to further clarify my understanding. In the following SEM model, aggression and stress are latent variables and reactivity is the mediating variable. I understood the code till the "#Variances and Covariances" part. I did not understand why in this code only the variances are specified and not the covariances, like I'm trying to understand the possible reasons so that it can help me write my own code. Thanks in advance.

medmodel1<-
'# measurement model
aggression =~ aggression1 + 1*aggression2
stress =~  1*stress1 + stress2
# Regressions with Parameter Names
aggression ~ stress + b1*reactivity
reactivity ~ a1*stress
## Indirect Effects
stag := a1*b1
## Variances and Covariances
stress1 ~~ stress1
reactivity ~~ reactivity
stress2 ~~ stress2
aggression1 ~~ aggression1
aggression2 ~~ aggression2
stress ~~ stress
aggression ~~ aggression 

Edward Rigdon

unread,
Jan 21, 2019, 6:11:28 PM1/21/19
to lav...@googlegroups.com
Tamanna--
     First, the whole model syntax should be enclosed in ticks, and I don't see an ending tick, so one should be added.
     The structural model (stress / reactivity / agression) is saturated. There is no room to permit free residual covariances--allowing those would make the statistical model not identified. The "measurement model" (linking observed variables to factors) is also saturated or nearly so. In this model, all covariance between variables runs through the loadings and structural paths. That is why no residual covariances are specified.
     

--

Tamanna Mostafa

unread,
Jan 21, 2019, 9:15:37 PM1/21/19
to lavaan
Thank you very much.
Reply all
Reply to author
Forward
0 new messages