|
Chapter Contents |
Previous |
Next |
| The MI Procedure |
This example applies the MCMC method to the FitMiss data set in which the variable Oxygen is transformed. Assume that Oxygen is skewed and can be transformed to normality with a logarithmic transformation. The following statements invoke the MI procedure and specify the transformation. The TRANSFORM statement specifies the log transformation for Oxygen. Note that the values displayed for Oxygen in all of the results correspond to transformed values.
proc mi data=FitMiss seed=37921 mu0=50 10 180 out=outmi;
transform log(Oxygen);
mcmc chain=multiple displayinit;
var Oxygen RunTime RunPulse;
run;
The following "Missing Data Patterns" table lists distinct missing data patterns with corresponding statistics for the FitMiss data. Note that the values of Oxygen shown in the tables are transformed values.
Output 9.7.1: Missing Data Pattern
The following "Variable Transformations" table lists the variables that have been transformed.
Output 9.7.2: Missing Data Pattern
| |||||||
The following "Initial Parameter Estimates for MCMC" table displays the starting mean and covariance estimates used in the MCMC process.
Output 9.7.3: Initial Parameter Estimates
| ||||||||||||||||||||||||||||||||||||
Output 9.7.4: Variance Information
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
The following table displays parameter estimates from the multiple imputation. Note that the parameter value of Mu0 has also been transformed using the logarithmic transformation.
Output 9.7.5: Parameter Estimates
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The following statements list the first ten observations of the data set outmi. Note that the values for Oxygen are in the original scale.
proc print data=outmi(obs=10);
title 'First 10 Observations of the Imputed Data Set';
run;
Output 9.7.6: Imputed Data Set in Original Scale
|
The preceding results can also be produced from the following statements without using a TRANSFORM statement.
data temp;
set FitMiss;
LogOxygen= log(Oxygen);
run;
proc mi data=temp seed=37921 mu0=3.91202 10 180 out=outtemp;
mcmc chain=multiple displayinit;
var LogOxygen RunTime RunPulse;
run;
data outmi;
set outtemp;
Oxygen= exp(LogOxygen);
run;
Note that a transformed value of log(50)=3.91202 is used in the MU0= option.
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.