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;

! select variables for analysis;

usevariables = eat1 - anx;

! specify missing value code;

missing are all (-99);

ANALYSIS:

! bayesian estimation;

estimator = bayes;

! random number seed for the mcmc algorithm;

bseed = 22912;

MODEL:

! estimate means;

[eat1 - anx];

! estimate variances;

eat1 - anx;

! estimate covariances;

eat1 - anx with eat1 - anx;

OUTPUT:

! tech8 gives the potential scale reduction factor convergence diagnostic;

tech8;

PLOT:

! time-series (and other) plots;

type = plot2;