Basic Confirmatory Factor Analysis (CFA) Example

Table of Contents

1 Title Command

TITLE:
Example 2 - Confirmatory Factor Analysis

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
wratspl wjspl waisspl wratcalc wjcalc waiscalc;

MISSING ARE all(99999);

4 Model Command

There is typically no ANALYSIS command when conducting a basic CFA, instead the user needs a MODEL command. Here the CFA model to be tested is specified. There are two latent variables of interest, "MATH" and "SPELL". The "MATH" variable is measured by the "wratcalc", "wjcalc", and "waiscalc" variables; and "SPELL" is measured by "wratspl", "wjspl", and "waisspl" variables. The first two lines tell Mplus that the latent variables are measured by the listed manifest variables. The "BY" statement that separates the latent and manifest variables is what specifies that the variables on the left side are indicated or measured by the variables on the right. Further, the first variable in each indicator variable list is followed by an astrisk; this is used to indicate that those variables should have freely estimated factor loadings (the Mplus default is to set the factor loading for the first item to be 1 for identification purposes).

MODEL:
MATH BY wratcalc* wjcalc waiscalc;
SPELL BY wratspl* wjspl waisspl;

Because all factor loadings are freely estimated, the variances for each latent variable must be specified by the user in order for the model to be identified. The last line of this chapter shows that the variance for each latent variable is set to be equal to 1.

MATH@1 SPELL@1;

Mplus will also estimate the covariance between the latent variables by default.

5 Output Command

Here the user can request additional output.

OUTPUT:
TECH1;
STDYX;

Date: 2016-09-12T14:42-0500

Author: Benjamin Arthur Kite

Org version 7.9.3f with Emacs version 24

Validate XHTML 1.0