Multiple imputation regression analysis with a categorical moderator (imputation phase)

TITLE:

section 9.9 data analysis example 1: moderated multiple regression (imputation phase);

DATA:

file = employee.dat;

VARIABLE:

! id = employee id;

! age = employee age;

! tenure = years on the job;

! female = gender (0 = male, 1 = female);

! wbeing = psychological well-being;

! jobsat = job satisfaction

! jobperf = job performance;

! turnover = turnover intentions (0 = no, 1 = yes);

! iq = iq score;

names = id age tenure female wbeing jobsat jobperf turnover iq;

usevariables = age tenure wbeing - iq;

classes = female (2);  ! categorical moderator;

knownclass = female (female = 0 female = 1);

missing = all(-99);

ANALYSIS:

type = mixture;

estimator = bayes;  ! bayes estimation;

bseed = 59311;  ! seed for mcmc algorithm;

DATA IMPUTATION:

impute = wbeing jobsat;  ! incomplete variables to be imputed;

ndatasets = 50;  ! number of imputed data sets;

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

thin = 100;  ! number of between-imputation iterations;

MODEL:

%overall% ! saturated within-group imputation model;

[age tenure wbeing - iq];  ! means;

age tenure wbeing - iq;  ! variances;

age tenure wbeing - iq with age tenure wbeing - iq;  ! covariances;

%female#1% ! group 1 imputation model;

[age tenure wbeing - iq];

age tenure wbeing - iq;

age tenure wbeing - iq with age tenure wbeing - iq;

%female#2% ! group 2 imputation model;

[age tenure wbeing - iq];

age tenure wbeing - iq;

age tenure wbeing - iq with age tenure wbeing - iq;

OUTPUT:

tech8;  ! PSR mcmc convergence diagnostic;

Questions or suggestions? Email Craig Enders