Multiple Group Confirmatory Factor Analysis (Metric Invariance) Example
Multiple Group Confirmatory Factor Analysis (Metric Invariance) Example
Tags: SEM, Measurement Invariance, Metric Invariance, Equal Loadings, Mplus
2019-01-30
Abstract: This guide outlines how to perform the second step/test in measurement invariance testing - metric invariance (or equal factor loadings). The model estimation results can be compared to the Measurement Invariance Example in R.
Table of Contents
1 TITLE Command
This is the second input file for this example.
TITLE: Example 3 - Multiple Group Confirmatory Factor Analysis (Metric Invariance)
2 DATA Command
DATA: FILE IS "../../data/job_placement.csv";
3 VARIABLE Command
VARIABLE: NAMES ARE id wjcalc wjspl wratspl wratcalc waiscalc waisspl edlevel newschl suspend expelled haveld female age; USEVARIABLES ARE wratcalc wjcalc waiscalc wratspl wjspl waisspl; MISSING ARE all(99999); GROUPING IS female(0=male 1=female);
4 MODEL Command
All of the changes come in the MODEL command. In this model the factor loadings need to be constrained to be equal for both males and females. This is accomplished by including the statements about factor loadings under the "MODEL:" heading, but not repeating them under "MODEL female:". This is telling Mplus to estimate a single factor loading for each item for males and females (Mplus does this by default). The other change is that under the "MODEL female:" heading the latent variable variances are no longer constrained to be equal to 1. The scale of the latent variables are set for the male group (both equal to 1) and the latent variable variances for females are based on that scaling. The constraints on the factor loadings allow for the latent variable variances for females to be freely estimated.
MODEL: MATH BY wratcalc* wjcalc waiscalc; SPELL BY wratspl* wjspl waisspl; [wratspl wjspl waisspl wratcalc wjcalc waiscalc]; MATH@1 SPELL@1; [MATH@0 SPELL@0]; MODEL female: [wratspl wjspl waisspl wratcalc wjcalc waiscalc]; MATH SPELL;
5 OUTPUT Command
Additional output can be requested.
OUTPUT: TECH1; STDYX;
6 Run the Model
mplus cfa-01-2-metric.inp
Mplus VERSION 8.2 (Linux) MUTHEN & MUTHEN Running input file 'cfa-01-2-metric.inp'... Beginning Time: 11:14:23 Ending Time: 11:14:23 Elapsed Time: 00:00:00 Output saved in 'cfa-01-2-metric.out'.
7 Review the Results
Click cfa-01-2-metric.out to see the output.