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;

! select variables for analysis;

usevariables = age tenure wbeing - iq;

! specify number of groups for the categorical moderator;

classes = female (2);

! define the moderator variable as a known latent class variable;

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

! specify missing value code;

missing = all(-99);

ANALYSIS:

! specify multiple group analysis as a mixture model;

type = mixture;

! specify model-based imputation;

estimator = bayes;

! random number seed for mcmc algorithm;

bseed = 59311;

DATA IMPUTATION:

! incomplete variables to be imputed;

impute = wbeing jobsat;

! number of imputed data sets;

ndatasets = 50;

! filename prefix for imputed data sets;

save = employeeimp*.dat;

! number of between-imputation iterations;

thin = 100;

MODEL:

! saturated within-group imputation model;

%overall%

! means;

[age tenure wbeing - iq];

! variances;

age tenure wbeing - iq;

! covariances;

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

! saturated imputation model for group 1;

%female#1%

! means;

[age tenure wbeing - iq];

! variances;

age tenure wbeing - iq;

! covariances;

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

! saturated imputation model for group 2;

%female#2%

! means;

[age tenure wbeing - iq];

! variances;

age tenure wbeing - iq;

! covariances;

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

OUTPUT:

! tech8 gives the potential scale reduction factor convergence diagnostic;

tech8;

Questions or suggestions? Email Craig Enders