The MI Procedure

Example 77.14 Multistage Imputation

(View the complete code for this example.)

This example uses two separate imputation procedures to complete the imputation process. In the first case, the MI procedure statements use the MCMC method to impute just enough missing values for a data set with an arbitrary missing pattern so that each imputed data set has a monotone missing pattern. In the second case, the MI procedure statements use a MONOTONE statement to impute missing values for data sets with monotone missing patterns.

The following statements are identical to those in Example 77.10. The statements invoke the MI procedure and specify the IMPUTE=MONOTONE option to create the imputed data set with a monotone missing pattern.

proc mi data=Fitness1 seed=17655417 nimpute=10 out=outex14;
   mcmc impute=monotone;
   var Oxygen RunTime RunPulse;
run;

The "Missing Data Patterns" table in Output 77.14.1 lists distinct missing data patterns with corresponding statistics. Here, an "X" means that the variable is observed in the corresponding group, a "." means that the variable is missing and will be imputed to achieve the monotone missingness for the imputed data set, and an "O" means that the variable is missing and will not be imputed. The table also displays group-specific variable means.

Output 77.14.1: Missing Data Patterns

The MI Procedure

Missing Data Patterns
GroupOxygenRunTimeRunPulseFreqPercentGroup Means
OxygenRunTimeRunPulse
1XXX2167.7446.35381010.809524171.666667
2XXO412.9047.10950010.137500.
3XOO39.6852.461667..
4.XX13.23.11.950000176.000000
5.XO26.45.9.885000.


As shown in the table, the MI procedure needs to impute only three missing values from group 4 and group 5 to achieve a monotone missing pattern for the imputed data set. When the MCMC method is used to produce an imputed data set with a monotone missing pattern, tables of variance information and parameter estimates are not created.

The following statements impute one value for each missing value in the monotone missingness data set Outex14:

proc mi data=outex14
        nimpute=1 seed=51343672
        out=outex14a;
   monotone reg;
   var Oxygen RunTime RunPulse;
   by _Imputation_;
run;

You can then analyze these data sets by using other SAS procedures and combine these results by using the MIANALYZE procedure. Note that the VAR statement is required with a MONOTONE statement to provide the variable order for the monotone missing pattern.

The "Model Information"  table in Output 77.14.2 shows that a monotone method is used to generate imputed values in the first BY group.

Output 77.14.2: Model Information

The MI Procedure

Model Information
Data SetWORK.OUTEX14
MethodMonotone
Number of Imputations1
Seed for random number generator51343672


The "Monotone Model Specification"  table in Output 77.14.3 describes methods and imputed variables in the imputation model. The MI procedure uses the regression method to impute the variables RunTime and RunPulse in the model.

Output 77.14.3: Monotone Model Specification

Monotone Model Specification
MethodImputed Variables
RegressionRunTime RunPulse


The "Missing Data Patterns" table in Output 77.14.4 lists distinct missing data patterns with corresponding statistics. It shows a monotone missing pattern for the imputed data set.

Output 77.14.4: Missing Data Patterns

Missing Data Patterns
GroupOxygenRunTimeRunPulseFreqPercentGroup Means
OxygenRunTimeRunPulse
1XXX2270.9746.05747910.861364171.863636
2XX.619.3546.74522710.053333.
3X..39.6852.461667..


The following statements list the first 10 observations of the data set Outex14a in Output 77.14.5:

proc print data=outex14a(obs=10);
   title 'First 10 Observations of the Imputed Data Set';
run;

Output 77.14.5: Imputed Data Set

First 10 Observations of the Imputed Data Set

Obs_Imputation_OxygenRunTimeRunPulse
1144.609011.3700178.000
2145.313010.0700185.000
3154.29708.6500156.000
4159.57107.1569169.914
5149.87409.2200159.315
6144.811011.6300176.000
7139.834511.9500176.000
8145.319610.8500151.252
9139.442013.0800174.000
10160.05508.6300170.000


This example presents an alternative to the full-data MCMC imputation, in which imputation of only a few missing values is needed to achieve a monotone missing pattern for the imputed data set. The example uses a monotone MCMC method that imputes fewer missing values in each iteration and achieves approximate stationarity in fewer iterations (Schafer 1997, p. 227). The example also demonstrates how to combine the monotone MCMC method with a method for monotone missing data, which does not rely on iterations of steps.

Last updated: February 13, 2019