Stata SEM Covariance Structure
Default and Implicit Behaviors
Error variables are assumed to be independent.
Fixing Parameters
To specify that two variables have non-zero covariance, use the cov option. This is mainly useful for error variables, since the default behavior is to assume independence.
... (x1 <- X) (x2 <- X) (x3 <- X), cov(e.x1*e.x2)
The option can be repeated to indicate that other variables also covary. For example, add cov(e.x2*e.x3) to the above.
On the other hand, to specify that two variables have zero covariance, try:
... cov(Y*X@0)
Structure
Sometimes, the simplest way to declare covariances is with a systemic statement. The alternate covstructure option takes two arguments: a variable list and a structure name.
Valid structure names are:
- unstructured = all unrestructed
- diagonal = variances unrestricted, zero covariance
- exchangeable = equal (co)variance
- identity = equal variance, zero covariance
- zero = zero (co)variance
There are a few keywords that can be taken as a variable list on this option.
_Ex = all exogenous variables
disallowed in -gsem-
_OEx = all observed exogenous variables
disallowed in -gsem-
_LEx = all latent exogenous variables
e._En = all error variables
e._OEn = all error variables associated with observed exogenous variables
e._LEn = all error variables associated with latent exogenous variables
..., covstructure(_oexogenous, unstructured)
This option, like cov, can be repeated.
