SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

37
Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion SEM 1: Confirmatory Factor Analysis Week 3 - Measurement invariance and latent growth models Sacha Epskamp 16-04-2019

Transcript of SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Page 1: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

SEM 1: Confirmatory Factor AnalysisWeek 3 - Measurement invariance and latent growth models

Sacha Epskamp

16-04-2019

Page 2: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

What’s missing from thesepictures?

Yerkes argued that histests measured nativeintellectual ability, inother words, innateintelligence which wasunaffected by cultureand educationalopportunities.

http://www.holah.karoo.

net/gouldstudy.htm

Page 3: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

What’s missing from thesepictures?

Yerkes argued that histests measured nativeintellectual ability, inother words, innateintelligence which wasunaffected by cultureand educationalopportunities.

http://www.holah.karoo.

net/gouldstudy.htm

Page 4: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

In response to research studying IQ differences between dutchmajority and minority groups:

Again, the subtest with the largest cultural component(Learning Names) shows the largest between-groupdifference. That is, the Learning Names subtest containsseveral Dutch names from various fairy tales, which maybe unfamiliar to children of Moroccan or Turkish descent.

Wicherts, J. M., & Dolan, C. V. (2010). Measurement invariance in

confirmatory factor analysis: An illustration using IQ test performance of

minorities. Educational Measurement: Issues and Practice, 29(3), 39-47.

Page 5: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Measurement invariance

• Plenty of research investigating group differences insum-scores, without taking measurement into account

• Sometimes even followed up by e.g., evolutionary theories onwhy groups differ

• Many pressing research questions can be answered withmeasurement invariance testing

• E.g., should students with dyslexia get more time on exams?

• CFA allow for fine-grained and fair group comparison, withoutrequiring estimated latent variable scores (e.g., sum-scores)!

• Before we can do this, we need to extend CFA withmeanstructure and multi-group analysis.

Page 6: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Including the mean structure:

yyy i = τττ + ΛΛΛηηηi + εεεi

yyy ∼ N(µµµ,ΣΣΣ)

ηηη ∼ N(ααα,ΨΨΨ)

εεε ∼ N(000,ΘΘΘ),

In which τττ (sometimes ννν) is an intercept vector and ααα a vector oflatent means. The model-implied variance–covariance matrix andmeans vectors become:

ΣΣΣ = ΛΛΛΨΨΨΛΛΛ> + ΘΘΘ

µµµ= τττ + ΛΛΛααα

µµµ should resemble sample means yyy as closely possible. Updated fitfunction:

FML = trace(SSSΣΣΣ−1

)+ (yyy −µµµ)>ΣΣΣ−1(yyy −µµµ)− ln |SSSΣΣΣ−1| − p,

Page 7: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

ΣΣΣ = ΛΛΛΨΨΨΛΛΛ> + ΘΘΘ

µµµ = τττ + ΛΛΛααα

• Number of observations: p(p + 1)/2 variances andcovariances and p means!

• Total number of observations: p(p + 3)/2!

• Number of added parameters:• p intercepts in τττ• Latent means in ααα

• τττ can cancel ααα out, hence we typically need to identify ααα = 000• Or fix enough intercepts in τττ to obtain an identified model

• p more observations, and p more parameters. This is why wenormally ignore means!

Page 8: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

1 θ11ψ11

λ21

θ22λ31

θ33

η1 y1 ε1

y2 ε2

y3 ε3

Page 9: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

1 θ11ψ11

λ21

θ22λ31

θ33

0 τ1

τ2

τ3

η1 y1 ε1

y2 ε2

y3 ε31

Typically identified with ααα = 000.

Page 10: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Latent Growth Model

Score of person i on time t:

yti = inti + slopei × t + εti

Since we know t (e.g., 1, 2, 3 . . .), we can treat the intercept andslope as latent variables and plug t into factor loadings!

Page 11: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

1 1 1 1 1 1 1 2 3 4 5 6

ψ11 ψ22ψ21

θ11 θ22 θ33 θ44 θ55 θ66

α1 α2int slope

yt=1 yt=2 yt=3 yt=4 yt=5 yt=6

ε1 ε2 ε3 ε4 ε5 ε6

1

Page 12: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Multi-group CFA

Suppose we measure two groups (e.g., control and experimental ormajority and minority population). We can then form two seperatemodels, first for group 1:

ΣΣΣ1 = ΛΛΛ1ΨΨΨ1ΛΛΛ>1 + ΘΘΘ1

µµµ1 = τττ1 + ΛΛΛ1ααα1

With observed variance–covariance matrix SSS1 and observed meansyyy1. For group 2:

ΣΣΣ2 = ΛΛΛ2ΨΨΨ2ΛΛΛ>2 + ΘΘΘ2

µµµ2 = τττ2 + ΛΛΛ2ααα2

With observed variance–covariance matrix SSS2 and observed meansyyy2. Twice as many observations and parameters.

Page 13: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

For m groups with sample size n1, n2, . . . from a total samplen = n1 + n2 + . . ., the fit function follows as:

FML =m∑

g=1

ngnF(g)ML,

in which F(g)ML indicates the fit function in a particular group.

• Number of observations (including mean structure): means,variances and covariances per group!

• m × p × (p + 3)/2

• Number of parameters: Total number of parameters over allgroups

• Parameters constrained equal over groups are only countedonce

Page 14: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

λ111

θ111

ψ111

λ211

θ221

λ311

θ331

α11

τ11 τ21 τ31

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 1

λ112

θ112

ψ112

λ212

θ222

λ312

θ332

α12

τ12 τ22 τ32

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 2

Model still needs to be scaled:

• Scaling of variance: λ111 = λ112 = 1 or ψ111 = ψ112 = 1

• Scaling of mean: α11 = α12 = 0

By imposing equality constrains, differences in means and variancesof latent variables may become identified!

Page 15: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

λ111

θ111

ψ111

λ211

θ221

λ311

θ331

α11

τ11 τ21 τ31

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 1

λ112

θ112

ψ112

λ212

θ222

λ312

θ332

α12

τ12 τ22 τ32

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 2

Model still needs to be scaled:

• Scaling of variance: λ111 = λ112 = 1 or ψ111 = ψ112 = 1

• Scaling of mean: α11 = α12 = 0

By imposing equality constrains, differences in means and variancesof latent variables may become identified!

Page 16: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

λ111

θ111

1

λ211

θ221

λ311

θ331

0

τ11 τ21 τ31

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 1

λ112

θ112

1

λ212

θ222

λ312

θ332

0

τ12 τ22 τ32

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 2

3 means, 3 variances and 3 covariances per group = 18observations. 3 residual variances; 3 factor loadings and 3 intereptsper group = 18 parameters; DF = 0.

Page 17: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

The goal of multi-group CFA is to measure differences in meansand (co)variances (networks) between groups:

Group 1Group 2

ηThat is, we wish to perform tests for homogeneity:

• ααα1 = ααα2 = ααα3 = . . . = ααα

• ΨΨΨ1 = ΨΨΨ2 = ΨΨΨ3 = . . . = ΨΨΨ

Without measurement error, that would be similar MANOVA,Box’s test, Levene’s test, etcetera.

Page 18: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

But...

• The latents means are not identified

• The latent variances are arbitrary due to scaling

• We don’t know if the test measures the same constructs inboth group.

It turns out these problems can both be solved by imposingsequential equality constrains and testing for increasing levels ofmeasurement invariance:

Name Additional constrains Allows to test

Configural invariance Same zeroes in ΛΛΛ1, ΛΛΛ2, . . .Weak invariance ΛΛΛ1 = ΛΛΛ2 = . . . = ΛΛΛ ΨΨΨ1 = ΨΨΨ2 = . . . = ΨΨΨStrong invariance τττ 1 = τττ 2 = . . . = τττ ααα1 = ααα2 = . . . = 000Strict invariance ΘΘΘ1 = ΘΘΘ2 = . . . = ΘΘΘ Full homogeneity

Note: ααα2,ααα3, . . . are identified if strong invariance holds.

Page 19: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

But...

• The latents means are not identified

• The latent variances are arbitrary due to scaling

• We don’t know if the test measures the same constructs inboth group.

It turns out these problems can both be solved by imposingsequential equality constrains and testing for increasing levels ofmeasurement invariance:

Name Additional constrains Allows to test

Configural invariance Same zeroes in ΛΛΛ1, ΛΛΛ2, . . .Weak invariance ΛΛΛ1 = ΛΛΛ2 = . . . = ΛΛΛ ΨΨΨ1 = ΨΨΨ2 = . . . = ΨΨΨStrong invariance τττ 1 = τττ 2 = . . . = τττ ααα1 = ααα2 = . . . = 000Strict invariance ΘΘΘ1 = ΘΘΘ2 = . . . = ΘΘΘ Full homogeneity

Note: ααα2,ααα3, . . . are identified if strong invariance holds.

Page 20: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Measurement Invariance

• Two compare two groups on their mean or variance, it isimperative that the test measures the same construct in bothgroups, and is not biased.

• Group membership may influence the latent trait, but shouldnot influence individual items.

• If measurement invariance does not hold, then test scores(e.g., sum-scores) can not be used to compare groups in ameaningful way

• If partial invariance holds (most parameters are equal acrossgroups), multi-group CFA can be used to test for homogeneityin means and variances

• But interpretation gets harder the more measurementinvariance is violated!

Canonical reference: Mellenbergh, G. J. (1989). Item bias anditem response theory. International journal of educationalresearch, 13(2), 127-143.

Page 21: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Wicherts, J. M., & Dolan, C. V. (2010). Measurement invariance in

confirmatory factor analysis: An illustration using IQ test performance of

minorities. Educational Measurement: Issues and Practice, 29(3), 39-47.

Page 22: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Wicherts, J. M., & Dolan, C. V. (2010). Measurement invariance in

confirmatory factor analysis: An illustration using IQ test performance of

minorities. Educational Measurement: Issues and Practice, 29(3), 39-47.

Page 23: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

λ111

θ111

1

λ211

θ221

λ311

θ331

0

τ11 τ21 τ31

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 1

λ112

θ112

1

λ212

θ222

λ312

θ332

0

τ12 τ22 τ32

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 2

Configural invariance: Does the same model fit in both groups?

Page 24: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

# Load the package:

library("lavaan")

# Load data:

data("HolzingerSwineford1939")

Data <- HolzingerSwineford1939

# Model:

Model <- '

visual =~ x1 + x2 + x3 + x9

textual =~ x4 + x5 + x6

speed =~ x7 + x8 + x9

x3 ~~ x5

'

# Fit configural:

conf <- cfa(Model, Data, group = "school")

fitMeasures(conf,

c("rmsea","cfi","tli","rni","rfi","ifi","srmr","gfi"))

## rmsea cfi tli rni rfi ifi srmr gfi

## 0.069 0.964 0.942 0.964 0.871 0.965 0.049 0.997

Page 25: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

λ11

θ111

1

λ21

θ221

λ31

θ331

0

τ11 τ21 τ31

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 1

λ11

θ112

ψ112

λ21

θ222

λ31

θ332

0

τ12 τ22 τ32

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 2

Weak Invariance: Are factor loadings the same? — Differences invariance (and covariances) of latent variable now interpretable!

Page 26: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

weak <- cfa(Model, Data, group = "school",

group.equal = "loadings")

anova(conf, weak)

## Chi Square Difference Test

##

## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)

## conf 44 7452.2 7689.4 75.646

## weak 51 7444.6 7655.9 82.094 6.4487 7 0.4884

(7 DF difference: −7 free factor loadings)

Page 27: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

λ11

θ111

1

λ21

θ221

λ31

θ331

0

τ1 τ2 τ3

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 1

λ11

θ112

ψ112

λ21

θ222

λ31

θ332

α12

τ1 τ2 τ3

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 2

Strong Invariance: Are the intercepts the same? — Latent meandifference now identified!

Page 28: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

strong <- cfa(Model, Data, group = "school",

group.equal = c("loadings","intercepts"))

anova(conf, weak, strong)

## Chi Square Difference Test

##

## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)

## conf 44 7452.2 7689.4 75.646

## weak 51 7444.6 7655.9 82.094 6.449 7 0.4884

## strong 57 7473.2 7662.2 122.638 40.544 6 3.561e-07 ***

## ---

## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(6 DF difference: −9 intercepts, but +3 latent variable means)

Page 29: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Where is the misfit?

# Group 1:

lavInspect(strong, "mu")[[1]] -

lavInspect(strong, "sampstat")[[1]]$mean

## x1 x2 x3 x9 x4 x5 x6 x7 x8

## 0.053 0.159 -0.227 0.051 -0.035 0.066 0.009 -0.182 0.077

# Group 2:

lavInspect(strong, "mu")[[2]] -

lavInspect(strong, "sampstat")[[2]]$mean

## x1 x2 x3 x9 x4 x5 x6 x7 x8

## -0.057 -0.130 0.166 -0.041 0.028 -0.032 -0.015 0.132 -0.064

Some other options are possile (e.g., ‘lavTestScore‘ in lavaan).

Page 30: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Free two intercepts:

strong2 <- cfa(Model, Data, group = "school",

group.equal = c("loadings","intercepts"),

group.partial = c("x3 ~ 1","x7 ~ 1"))

anova(conf, weak, strong, strong2)

## Chi Square Difference Test

##

## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)

## conf 44 7452.2 7689.4 75.646

## weak 51 7444.6 7655.9 82.094 6.449 7 0.4884

## strong2 55 7442.4 7638.9 87.846 5.752 4 0.2185

## strong 57 7473.2 7662.2 122.638 34.792 2 2.786e-08 ***

## ---

## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Page 31: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

λ11

θ11

1

λ21

θ22

λ31

θ33

0

τ1 τ2 τ3

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 1

λ11

θ11

ψ112

λ21

θ22

λ31

θ33

α12

τ1 τ2 τ3

η1

y1

ε1

y2

ε2

y3

ε3

1

Group 2

Strict Invariance: Are the residual variances the same?

Page 32: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

strict <- cfa(Model, Data, group = "school",

group.equal = c("loadings","intercepts","residuals",

"residual.covariances"),

group.partial = c("x3 ~ 1","x7 ~ 1"))

anova(strong2, strict)

## Chi Square Difference Test

##

## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)

## strong2 55 7442.4 7638.9 87.846

## strict 65 7441.9 7601.3 107.398 19.552 10 0.03379 *

## ---

## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

10 less parameters (residual variances). Strict invariance holdsadequatly (although debatable).

Page 33: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Do the variances differ?

eqvars <- cfa(Model, Data, group = "school",

group.equal = c("loadings","intercepts","residuals",

"residual.covariances","lv.variances"),

group.partial = c("x3 ~ 1","x7 ~ 1"))

anova(strict, eqvars)

## Chi Square Difference Test

##

## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)

## strict 65 7441.9 7601.3 107.40

## eqvars 68 7437.5 7585.8 108.95 1.5561 3 0.6694

Page 34: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

And the means?

eqmeans <- cfa(Model, Data, group = "school",

group.equal = c("loadings","intercepts","residuals",

"residual.covariances","lv.variances",

"means"),

group.partial = c("x3 ~ 1","x7 ~ 1"))

anova(eqvars, eqmeans)

## Chi Square Difference Test

##

## Df AIC BIC Chisq Chisq diff Df diff Pr(>Chisq)

## eqvars 68 7437.5 7585.8 108.95

## eqmeans 71 7460.6 7597.8 138.10 29.141 3 2.092e-06 ***

## ---

## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Page 35: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Does the model fit still?

fitMeasures(eqvars,

c("rmsea","cfi","tli","rni","rfi","ifi","srmr","gfi"))

## rmsea cfi tli rni rfi ifi srmr gfi

## 0.063 0.954 0.951 0.954 0.880 0.954 0.067 0.995

Adequately, we may now substantively interpret these groupdifferences between the schools:

lavInspect(eqvars, "est")[[2]]$alpha

## intrcp

## visual 0.035

## textual 0.574

## speed -0.082

Page 36: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Conclusion

• Means can be added to the CFA model

• In a single group, this can be used e.g., to model growth

• In multiple-group CFA, a CFA model is fitted to several groups

• Measurement invariance can be assessed stepwise:

Name Additional constrains Allows to test

Configural invariance Same zeroes in ΛΛΛ1, ΛΛΛ2, . . .Weak invariance ΛΛΛ1 = ΛΛΛ2 = . . . = ΛΛΛ ΨΨΨ1 = ΨΨΨ2 = . . . = ΨΨΨStrong invariance τττ 1 = τττ 2 = . . . = τττ ααα1 = ααα2 = . . . = 000Strict invariance ΘΘΘ1 = ΘΘΘ2 = . . . = ΘΘΘ Full homogeneity

Note: ααα2,ααα3, . . . are identified if strong invariance holds.

Page 37: SEM 1: Con rmatory Factor Analysis - sachaepskamp.com

Introduction Mean-structure Latent growth Multi-group CFA Measurement invariance Conclusion

Thank you for your attention!