TITLE:

section 5.14 data analysis example 3: confirmatory factor analysis with auxiliary variables and naive bootstrap;

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 bmi wsb anx;

! specify missing value code;

missing are all (-99);

ANALYSIS:

! ml missing data handling (the default);

estimator = ml;

! naive bootstrap

bootstrap = 2000 (standard);

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*;

! specify auxiliary variable correlations;

bmi wsb anx with bmi wsb anx eat1 - eat24;

OUTPUT:

! standardized gives standardized estimates (stdyx solution);

! sampstat gives em estimates of summary statistics;

standardized(stdyx) sampstat;