sem 2: structural equation modeling - week 2 - structural...
TRANSCRIPT
SEM 2: Structural Equation ModelingWeek 2 - Structural Equation Modeling
Sacha Epskamp
May 1, 2020
Structural Equation Modeling
I Structural equation modeling (SEM) extends confirmatoryfactor analysis (CFA) by modeling the variance–covariancematrix of latent variables with a path model
I Allows one to test causal hypotheses on the latent variablesI Includes path analysis for observed variables:
I Define one latent per observed variableI Set factor loading to 1I Set residual variance to 0
I In lavaan: use sem() function and define structuralrelationships using the ~ operator (same as used in regressionanalysis)
I In psychonetrics: use the beta argument in lvm() to modeldirect effects
Exogenous measurement model (using full LISREL notation, it getseasier!):
xxx i = ΛΛΛxξξξi + δδδi
xxx ∼ N(000,ΣΣΣx)
ξξξ ∼ N(000,ΦΦΦ)
δδδ ∼ N(000,ΘΘΘδ),
Allows you to derive the model-implied variance–covariance matrix:
ΣΣΣx = Var(xxx) = Var(ΛΛΛxξξξ + δδδ)
= ΛΛΛxVar(ξξξ)ΛΛΛ>x + Var(δδδ)
= ΛΛΛxΦΦΦΛΛΛ>x + ΘΘΘδ
Endogenous model:
yyy i = ΛΛΛyηηηi + εεεi
ηηηi = ΓΓΓξξξi +BBBηηηi + ζζζ i
yyy ∼ N(000,ΣΣΣy )
ξξξ ∼ N(000,ΦΦΦ)
ζζζ ∼ N(000,ΨΨΨ),Note that ΨΨΨ is now diagonal!
εεε ∼ N(000,ΘΘΘε)
Only different from CFA model in the added regression parametersΓΓΓ and BBB. Note that ηηηi appears twice in the structural model, solet’s first solve that:
ηηηi = ΓΓΓξξξi +BBBηηηi + ζζζ i
ηηηi −BBBηηηi = ΓΓΓξξξi + ζζζ i
(III −BBB)ηηηi = ΓΓΓξξξi + ζζζ i
ηηηi = (III −BBB)−1ΓΓΓξξξi + (III −BBB)−1ζζζ i
Now:
Var(ηηη) = Var((III −BBB)−1ΓΓΓξξξi + (III −BBB)−1ζζζ i
)= Var
((III −BBB)−1ΓΓΓξξξi
)+ Var
((III −BBB)−1ζζζ i
)= (III −BBB)−1ΓΓΓΦΦΦ
((III −BBB)−1ΓΓΓ
)>+ (III −BBB)−1ΨΨΨ(III −BBB)−1>
Which can be used in:
Var(yyy) = ΛΛΛyVar(ηηη)ΛΛΛ>y + ΘΘΘε
And Cov(xxx ,yyy) can similarly be derived. Way too complicated...
All-y notation
Much easier, just treat exogenous variables as endogenousvariables. All latents are then contained in ηηη and all indicators inyyy . Only important to note is that ΨΨΨ then contains both exogenousvariances and covariances (all freely estimated) as well as latentresidual variances (usually without covariances).
All-y model:
yyy i = ΛΛΛηηηi + εεεi
ηηηi = BBBηηηi + ζζζ i
= (III −BBB)−1ζζζ i
yyy ∼ N(000,ΣΣΣ)
ζζζ ∼ N(000,ΨΨΨ)
εεε ∼ N(000,ΘΘΘ)
Results in:
ΣΣΣ = Var(yyy) = Var (ΛΛΛηηη + εεε)
= Var (ΛΛΛηηη) + Var (εεε)
= ΛΛΛVar (ηηη) ΛΛΛ> + ΘΘΘ
= ΛΛΛVar((III −BBB)−1ζζζ
)ΛΛΛ> + ΘΘΘ
= ΛΛΛ(III −BBB)−1ΨΨΨ(III −BBB)−1>ΛΛΛ> + ΘΘΘ
SEM model:
ΣΣΣ = ΛΛΛ(III −BBB)−1ΨΨΨ(III −BBB)−1>ΛΛΛ> + ΘΘΘSimply the CFA model with one extra matrix: BBB encoding
regression parameters. Element βij encodes the effect from variablej to variable i (note, this is opposite of how normally a directednetwork is encoded).The same identification rules as in CFA apply:
I Latent variables must be scaled by setting one factor loadingor (residual) variance to 1
I Model must have at least 0 degrees of freedom
Next week we will discuss equivalent models.
β1 β2
θ1 θ2
x y1 y2
β21 β32
ψ11 ψ22 ψ33
1 1 1
η1 η2 η3
y1 y2 y3
ΛΛΛ =
1 0 00 1 00 0 1
,ΨΨΨ =
ψ11 0 00 ψ22 00 0 ψ33
,ΘΘΘ =
0 0 00 0 00 0 0
,BBB =
0 0 0β21 0 00 β32 0
β21 β32
ψ11 ψ22 ψ33
1 1 1
η1 η2 η3
y1 y2 y3
Lavaan automatically adds the latent dummy variables for you!The model is just:
y2 ~ y1
y3 ~ y2
β21 β32
1 λ21 1 λ42 1 λ63
ψ11 ψ22 ψ33
θ11 θ22 θ33 θ44 θ55 θ66
η1 η2 η3
y1 y2 y3 y4 y5 y6
ΛΛΛ =
1 0 0λ21 0 00 1 00 λ42 00 0 10 0 λ63
,ΨΨΨ =
ψ11 0 00 ψ22 00 0 ψ33
,BBB =
0 0 0β21 0 00 β32 0
ΘΘΘ diagonal as usual.
β21 β32
1 λ21 1 λ42 1 λ63
ψ11 ψ22 ψ33
θ11 θ22 θ33 θ44 θ55 θ66
η1 η2 η3
y1 y2 y3 y4 y5 y6
Lavaan model (using sem()):
eta1 =~ y1 + y2
eta2 =~ y3 + y4
eta3 =~ y5 + y6
eta2 ~ eta1
eta3 ~ eta2
Exogenous predictors
1
θ11
ψ11
λ21 θ22
λ31
θ33
γ η
y1 ε1
y2 ε2
y3 ε3
x
ζ
Often software allows x to not be continuous. If x is binary, modelcomparable to strict invariance model.