Confirmatory Factor Analysis of Depression
Confirmatory Factor Analysis of Depression
Tags:
2019-02-04
Abstract:
Table of Contents
1 The lavaan Example
2 TITLE Command
TITLE: Example 7 Health Behavior in School Children Confirmatory Factor Analysis with Ordinal-Categorical Data using WLSMV with Listwise Deletion for Depression;
3 DATA Command
DATA: FILE IS "../../../data/hbsc-subset2/hbsc-subset2.dat"; LISTWISE = ON;
4 VARIABLE Command
VARIABLE: NAMES ARE stud_id schl_id Gender Age Grade body1r body2 body3r body4 body5r phyhlth1 phyhlth2 phyhlth3 phyhlth4 phyhlth5 phyhlth6 phyhlth7 phyhlth8 Depress1 Depress2 Depress3 Depress4 Depress5 Depress6 Bullied1 Bullied2 Bullied3 Bullied4 Bullied5 Bullied6 Bullied7 Bullied8 Bullied9 Bullier1 Bullier2 Bullier3 Bullier4 Bullier5 Bullier6 Bullier7 Bullier8 Bullier9 Alc1 Alc2 Alc3 Alc4 Alc5; USEVARIABLES ARE Depress1-Depress6; CATEGORICAL ARE Depress1-Depress6; USEOBSERVATIONS ARE Grade EQ 6 OR Grade EQ 7; MISSING ARE all(-999);
5 ANALYSIS
ANALYSIS: ESTIMATOR = WLSMV;
6 MODEL Command
MODEL: Depress BY Depress1* Depress2-Depress6; Depress@1;
7 OUTPUT Command
OUTPUT: SAMPSTAT; TECH1; STANDARDIZED;
8 Run the Model
mplus cfa-depress-wlsmv-listwise.inp
Mplus VERSION 8.2 (Linux) MUTHEN & MUTHEN Running input file 'cfa-depress-wlsmv-listwise.inp'... Beginning Time: 11:17:32 Ending Time: 11:17:32 Elapsed Time: 00:00:00 Output saved in 'cfa-depress-wlsmv-listwise.out'.
9 Review the Results
Click cfa-depress-wlsmv-listwise.out to see the output.