sem 2: structural equation modeling - week 2 - structural...

22
SEM 2: Structural Equation Modeling Week 2 - Structural Equation Modeling Sacha Epskamp May 1, 2020

Upload: others

Post on 24-Jan-2021

15 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

SEM 2: Structural Equation ModelingWeek 2 - Structural Equation Modeling

Sacha Epskamp

May 1, 2020

Page 2: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

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

Page 3: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2
Page 4: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2
Page 5: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2
Page 6: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2
Page 7: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2
Page 8: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2
Page 9: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2
Page 10: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2
Page 11: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

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 + ΘΘΘδ

Page 12: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

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

Page 13: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

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

Page 14: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

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

Page 15: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

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>ΛΛΛ> + ΘΘΘ

Page 16: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

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.

Page 17: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

β1 β2

θ1 θ2

x y1 y2

Page 18: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

β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

Page 19: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

β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

Page 20: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

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

Page 21: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

β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

Page 22: SEM 2: Structural Equation Modeling - Week 2 - Structural …sachaepskamp.com/files/SEM2_2020/SEM2Week1_2020_SEM.pdf · 2020. 5. 1. · SEM 2: Structural Equation Modeling Week 2

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.