TITLE:

section 8.16 data analysis example 3: confirmatory factor analysis (diagnostic phase);

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;

usevariables = eat1 - anx;

missing are all (-99);

ANALYSIS:

type = basic; ! saturated imputation model;

bseed = 61932; ! random number seed for mcmc algorithm;

fbiterations = 4000; ! total iterations;

DATA IMPUTATION:

impute = eat1 (c) eat2 (c) eat10 (c) eat12 (c) eat24 (c) eat18 (c) eat21 (c)

bmi wsb anx; ! (c) = binary or an ordinal variables;

ndatasets = 1; ! number of imputed data sets;

save = eatimp*.dat; ! filename prefix for imputed data;

thin = 4000; ! between-imputation iterations;

OUTPUT:

tech8; ! PSR mcmc convergence diagnostic;