The MI Procedure

Getting Started: MI Procedure

(View the complete code for this example.)

The Fitness data described in the REG procedure are measurements of 31 individuals in a physical fitness course. See Chapter 99: The REG Procedure, for more information.

The Fitness1 data set is constructed from the Fitness data set and contains three variables: Oxygen, RunTime, and RunPulse. Some values have been set to missing, and the resulting data set has an arbitrary pattern of missingness in these three variables.

*---------------------Data on Physical Fitness-------------------------*
| These measurements were made on men involved in a physical fitness   |
| course at N.C. State University. Certain values have been set to     |
| missing and the resulting data set has an arbitrary missing pattern. |
| Only selected variables of                                           |
| Oxygen (intake rate, ml per kg body weight per minute),              |
| Runtime (time to run 1.5 miles in minutes),                          |
| RunPulse (heart rate while running) are used.                        |
*----------------------------------------------------------------------*;
data Fitness1;
   input Oxygen RunTime RunPulse @@;
   datalines;
44.609  11.37  178     45.313  10.07  185
54.297   8.65  156     59.571    .      .
49.874   9.22    .     44.811  11.63  176
  .     11.95  176          .  10.85    .
39.442  13.08  174     60.055   8.63  170
50.541    .      .     37.388  14.03  186
44.754  11.12  176     47.273    .      .
51.855  10.33  166     49.156   8.95  180
40.836  10.95  168     46.672  10.00    .
46.774  10.25    .     50.388  10.08  168
39.407  12.63  174     46.080  11.17  156
45.441   9.63  164       .      8.92    .
45.118  11.08    .     39.203  12.88  168
45.790  10.47  186     50.545   9.93  148
48.673   9.40  186     47.920  11.50  170
47.467  10.50  170
;

Suppose that the data are multivariate normally distributed and the missing data are missing at random (MAR). That is, the probability that an observation is missing can depend on the observed variable values of the individual, but not on the missing variable values of the individual. See the section Statistical Assumptions for Multiple Imputation for a detailed description of the MAR assumption.

The following statements invoke the MI procedure and impute missing values for the Fitness1 data set:

proc mi data=Fitness1 seed=501213 mu0=50 10 180 out=outmi;
   mcmc;
   var Oxygen RunTime RunPulse;
run;

The "Model Information" table in Figure 76.1 describes the method used in the multiple imputation process. By default, the MCMC statement uses the Markov chain Monte Carlo (MCMC) method with a single chain to create 25 imputations. The posterior mode, the highest observed-data posterior density, with a noninformative prior, is computed from the expectation-maximization (EM) algorithm and is used as the starting value for the chain.

Figure 76.1: Model Information

The MI Procedure

Model Information
Data SetWORK.FITNESS1
MethodMCMC
Multiple Imputation ChainSingle Chain
Initial Estimates for MCMCEM Posterior Mode
StartStarting Value
PriorJeffreys
Number of Imputations25
Number of Burn-in Iterations200
Number of Iterations100
Seed for random number generator501213


The MI procedure takes 200 burn-in iterations before the first imputation and 100 iterations between imputations. In a Markov chain, the information in the current iteration influences the state of the next iteration. The burn-in iterations are iterations in the beginning of each chain that are used both to eliminate the series of dependence on the starting value of the chain and to achieve the stationary distribution. The between-imputation iterations in a single chain are used to eliminate the series of dependence between the two imputations.

The "Missing Data Patterns" table in Figure 76.2 lists distinct missing data patterns with their corresponding frequencies and percentages. An "X" means that the variable is observed in the corresponding group, and a "." means that the variable is missing. The table also displays group-specific variable means. The MI procedure sorts the data into groups based on whether the analysis variables are observed or missing. For a detailed description of missing data patterns, see the section Missing Data Patterns.

Figure 76.2: Missing Data Patterns

Missing Data Patterns
GroupOxygenRunTimeRunPulseFreqPercentGroup Means
OxygenRunTimeRunPulse
1XXX2167.7446.35381010.809524171.666667
2XX.412.9047.10950010.137500.
3X..39.6852.461667..
4.XX13.23.11.950000176.000000
5.X.26.45.9.885000.


After the completion of m imputations, the "Variance Information" table in Figure 76.3 displays the between-imputation variance, within-imputation variance, and total variance for combining complete-data inferences. It also displays the degrees of freedom for the total variance. The relative increase in variance due to missing values, the fraction of missing information, and the relative efficiency (in units of variance) for each variable are also displayed. A detailed description of these statistics is provided in the section Combining Inferences from Multiply Imputed Data Sets.

Figure 76.3: Variance Information

Variance Information (25 Imputations)
VariableVarianceDFRelative
Increase
in Variance
Fraction
Missing
Information
Relative
Efficiency
BetweenWithinTotal
Oxygen0.0371260.9364720.97508427.0180.0412310.0397240.998414
RunTime0.0013170.0657160.06708627.5930.0208430.0204510.999183
RunPulse1.3862903.3940434.83578418.430.4247860.3032820.988014


The "Parameter Estimates" table in Figure 76.4 displays the estimated mean and standard error of the mean for each variable. The inferences are based on the t distribution. The table also displays a 95% confidence interval for the mean and a t statistic with the associated p-value for the hypothesis that the population mean is equal to the value specified with the MU0= option. A detailed description of these statistics is provided in the section Combining Inferences from Multiply Imputed Data Sets.

Figure 76.4: Parameter Estimates

Parameter Estimates (25 Imputations)
VariableMeanStd Error95% Confidence LimitsDFMinimumMaximumMu0t for H0:
Mean=Mu0
Pr > |t|
Oxygen47.1000500.98746345.074049.126127.01846.77434747.43472650.000000-2.940.0067
RunTime10.5645530.25901010.033611.095527.59310.47258410.63662910.0000002.180.0380
RunPulse171.4903812.199042166.8781176.102718.43169.175377173.421951180.000000-3.870.0011


In addition to the output tables, the procedure also creates a data set with imputed values. The imputed data sets are stored in the Outmi data set, with the index variable _Imputation_ indicating the imputation numbers. The data set can now be analyzed using standard statistical procedures with _Imputation_ as a BY variable.

The following statements list the first 10 observations of data set Outmi:

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

The table in Figure 76.5 shows that the precision of the imputed values differs from the precision of the observed values. You can use the ROUND= option to make the imputed values consistent with the observed values.

Figure 76.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.57108.0747155.925
5149.87409.2200176.837
6144.811011.6300176.000
7142.885711.9500176.000
8146.999210.8500173.099
9139.442013.0800174.000
10160.05508.6300170.000