The MI Procedure |
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 54.7. 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=FitMiss seed=17655417 out=outex11; mcmc impute=monotone; var Oxygen RunTime RunPulse; run;
The "Missing Data Patterns" table in Output 54.11.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.
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 outex11:
proc mi data=outex11 nimpute=1 seed=51343672 out=outex11a; 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 54.11.2 shows that a monotone method is used to generate imputed values in the first BY group.
The "Monotone Model Specification" table in Output 54.11.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.
The "Missing Data Patterns" table in Output 54.11.4 lists distinct missing data patterns with corresponding statistics. It shows a monotone missing pattern for the imputed data set.
The following statements list the first 10 observations of the data set outex11a in Output 54.11.5:
proc print data=outex11a(obs=10); title 'First 10 Observations of the Imputed Data Set'; run;
First 10 Observations of the Imputed Data Set |
Obs | _Imputation_ | Oxygen | RunTime | RunPulse |
---|---|---|---|---|
1 | 1 | 44.6090 | 11.3700 | 178.000 |
2 | 1 | 45.3130 | 10.0700 | 185.000 |
3 | 1 | 54.2970 | 8.6500 | 156.000 |
4 | 1 | 59.5710 | 7.1569 | 169.914 |
5 | 1 | 49.8740 | 9.2200 | 159.315 |
6 | 1 | 44.8110 | 11.6300 | 176.000 |
7 | 1 | 39.8345 | 11.9500 | 176.000 |
8 | 1 | 45.3196 | 10.8500 | 151.252 |
9 | 1 | 39.4420 | 13.0800 | 174.000 |
10 | 1 | 60.0550 | 8.6300 | 170.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.
Copyright © SAS Institute, Inc. All Rights Reserved.