TITLE:

section 5.14 data analysis example 3: confirmatory factor analysis with auxiliary variables and robust standard errors;

DATA:

file = eatingattitudes.dat;

VARIABLE:

! id = participant id;

! eat1-eat21 = eating attitudes test items;

! bmi = body mass index;

! wsb = western standards of beauty;

! anx = anxiety;

names = id eat1 eat2 eat10 eat11 eat12 eat14 eat24 eat3 eat18 eat21 bmi wsb anx;

! select variables for analysis;

usevariables = eat1 - eat21;

! specify auxiliary variables;

auxiliary = (m) bmi - anx;

! specify missing value code;

missing are all (-99);

ANALYSIS:

! mlr produces robust standard errors and fit statistics;

estimator = mlr;

MODEL:

! set metric of latent variables;

drive@1 foodpre@1;

! define loading patterns for each latent variable;

drive by eat1-eat24*;

foodpre by eat3-eat21*;

OUTPUT:

! standardized gives standardized estimates (stdyx solution);

! sampstat gives em estimates of summary statistics;

standardized(stdyx) sampstat;