Maximum likelihood MNAR selection model

TITLE:

section 10.18 data analysis example 2: mnar selection model;

DATA:

file is depression.dat;

VARIABLE:

! txgroup = condition (0 = control, 1 = treatment);

! dep1-dep3 = wave 1 - wave 3 depression scores;

! r2 = wave 2 missing indicator (0 = complete, 1 = missing);

! r3 = wave 3 missing indicator (0 = complete, 1 = missing, 

   -99 previously missing);

! pattern = missing data pattern (1 = wave 2 dropout, 2 = wave 3 dropout, 

   3 = completer);

! dropout = dropout indicator (0 = completer, 1 = dropout);

names = txgroup dep1 - dep3 r2 r3 patt dropout;

! select variables for analysis;

usevariables = txgroup dep1 - dep3 r2 r3;

! specify missing value code;

missing = all (-99);

! define missingness indicators as categorical;

categorical are r2 r3;

ANALYSIS:

! specify ml with robust standard errors;

estimator = mlr;

! monte carlo integration;

integration = montecarlo;

MODEL:

! linear growth model;

! ( ) contain parameter labels used by the model constraint command;

icept slope | dep1@0 dep2@1 dep3@2;

icept on txgroup (b3);

slope on txgroup (b4);

icept (iceptvar); 

slope; 

icept with slope;

dep1-dep3 (resvar);

! logistic portion of model:

! regress indicators on scores from previous wave;

r2 on dep1 (2);

r3 on dep2 (2);

! regress indicators on scores from current wave;

r2 on dep2 (3);

r3 on dep3 (3);

! regress indicators on treatment group membership;

r2 on txgroup (4);

r3 on txgroup (4);

MODEL CONSTRAINT:

! define new parameters not in the model;

new(meandiff effsize);

! compute endpoint mean difference and effect size;

meandiff = b3 + 2*b4;

effsize = meandiff / sqrt(iceptvar + resvar);

OUTPUT:

! sampstat gives em estimates of summary statistics;

sampstat;

Questions or suggestions? Email Craig Enders