|
Chapter Contents |
Previous |
Next |
| The MI Procedure |
This example uses 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 based on the order of variables in the VAR statement.
The following statements invoke the MI procedure and specify the the IMPUTE=MONOTONE option to create the imputed data set with a monotone missing pattern. You must specify a VAR list to provide the order of variables for the imputed data to achieve a monotone missing pattern.
proc mi data=FitMiss seed=55417 out=outmono;
mcmc impute=monotone;
var Oxygen RunTime RunPulse;
run;
Output 9.5.1: Model InformationThe following "Missing Data Patterns" table 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 9.5.2: Missing Data Pattern
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
When using the MCMC method to produce an imputed data set with a monotone missing pattern, tables of variance information and parameter estimates are not created.
The following statements are used just to show the monotone missingness of the output data set outmono.
proc mi data=outmono ( where= (_Imputation_=1) )
nimpute=0;
var Oxygen RunTime RunPulse;
run;
Output 9.5.3: Monotone Missing Data Pattern
| |||||||||||||||||||||||||||||||||||||||||||||||||
The following statements impute one value for each missing value in the monotone missingness data set outmono. The variable _Imputation_ is renamed to Impute so that it will not be overwritten by the the new variable _Imputation_ being created in the MI procedure.
proc mi data=outmono( rename=(_Imputation_=Impute))
nimpute=1 seed=43672
out=outds( rename=(Impute=_Imputation_) drop=_Imputation_);
monotone method=reg;
var Oxygen RunTime RunPulse;
by Impute;
run;
The variable Impute is renamed to _Imputation_ in the output data outds. This makes the output data set have the same structure as output data sets generated from other imputation methods. You can then analyze these data sets by using other SAS procedures and combine these results by using the procedure MIANALYZE. Note that the VAR statement is required with a MONOTONE statement to provide the variable order for the monotone missing pattern.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.