Maximum likelihood MNAR pattern mixture growth model (neighboring case identification constraint)

TITLE:

section 10.20 data analysis example 4: pattern mixture model 

with neighboring case missing variable restriction;

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 pattern dropout;

! select variables for analysis;

usevariables = txgroup dep1 - dep3;

! specify missing value code;

missing = all (-99);

! define missing data patterns;

classes = pattern(3);

knownclass = pattern(pattern = 1 pattern = 2 pattern = 3);

ANALYSIS:

! specify mixture model analysis;

type = mixture;

MODEL:

%overall%

! linear growth model;

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

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

icept slope on txgroup;

icept (iceptvar); 

slope; 

icept with slope;

dep1-dep3 (resvar);

[pattern#1] (p1logit);

[pattern#2] (p2logit);

! pattern-specific models;

! () contain parameter labels for model constraints;

%pattern#1%

! wave 2 dropouts;

[icept] (p1i);

[slope] (p1s);

icept on txgroup (p1iontx);

slope on txgroup (p1sontx);

%pattern#2%

! wave 3 dropouts;

[icept] (p2i);

[slope] (p2s);

icept on txgroup (p2iontx);

slope on txgroup (p2sontx);

%pattern#3%

! completers;

[icept] (p3i);

[slope] (p3s);

icept on txgroup (p3iontx);

slope on txgroup (p3sontx);

MODEL CONSTRAINT:

! implement identifying restrictions;

p1s = p2s;

p1sontx = p2sontx;

! define new parameters not in model;

new(c1prop c2prop c3prop iceptavg slopeavg iontxavg sontxavg meandiff effsize);

! compute pattern proportions;

c1prop = exp(p1logit)/(exp(0) + exp(p1logit) + exp(p2logit));

c2prop = exp(p2logit)/(exp(0) + exp(p1logit) + exp(p2logit));

c3prop = exp(0)/(exp(0) + exp(p1logit) + exp(p2logit));

! average estimates across patterns;

iceptavg = c1prop*p1i + c2prop*p2i + c3prop*p3i;

slopeavg = c1prop*p1s + c2prop*p2s + c3prop*p3s;

iontxavg = c1prop*p1iontx + c2prop*p2iontx + c3prop*p3iontx;

sontxavg = c1prop*p1sontx + c2prop*p2sontx + c3prop*p3sontx;

! compute endpoint mean difference and effect size;

meandiff = iontxavg + 2*sontxavg;

effsize = meandiff / sqrt(iceptvar + resvar);

OUTPUT:

! sampstat gives em estimates of summary statistics;

sampstat;

Questions or suggestions? Email Craig Enders