Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The MI Procedure

Example 9.7: Transformation to Normality

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 MI Procedure

Missing Data Patterns
Group Oxygen RunTime RunPulse Freq Percent Group Means
Oxygen RunTime RunPulse
1 X X X 21 67.74 3.829760 10.809524 171.666667
2 X X . 4 12.90 3.851813 10.137500 .
3 X . . 3 9.68 3.955298 . .
4 . X X 1 3.23 . 11.950000 176.000000
5 . X . 2 6.45 . 9.885000 .
Transformed Variables: Oxygen

The following "Variable Transformations" table lists the variables that have been transformed.

Output 9.7.2: Missing Data Pattern
 
The MI Procedure

Variable Transformations
Variable _Transform_
Oxygen LOG

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
 
The MI Procedure

Initial Parameter Estimates for MCMC
_TYPE_ _NAME_ Oxygen RunTime RunPulse
MEAN   3.846122 10.557605 171.382949
COV Oxygen 0.010827 -0.120891 -0.328772
COV RunTime -0.120891 1.744580 3.011179
COV RunPulse -0.328772 3.011179 82.747608
Transformed Variables: Oxygen

The following table displays variance information from the multiple imputation.

Output 9.7.4: Variance Information
 
The MI Procedure

Multiple Imputation Variance Information
  Variable Variance DF Relative
Increase
in Variance
Fraction
Missing
Information
Between Within Total
* Oxygen 0.000004541 0.000398 0.000404 27.766 0.013685 0.013590
  RunTime 0.000814 0.063128 0.064105 27.708 0.015478 0.015356
  RunPulse 0.182700 3.498974 3.718214 25.923 0.062658 0.060595
* Transformed Variables

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 MI Procedure

Multiple Imputation Parameter Estimates
  Variable Mean Std Error 95% Confidence Limits DF Minimum Maximum Mu0 t for H0:
Mean=Mu0
Pr > |t|
* Oxygen 3.845991 0.020091 3.8048 3.8872 27.766 3.843860 3.848775 3.912023 -3.29 0.0028
  RunTime 10.586242 0.253190 10.0674 11.1051 27.708 10.547440 10.616746 10.000000 2.32 0.0282
  RunPulse 170.849654 1.928267 166.8855 174.8138 25.923 170.315955 171.324638 180.000000 -4.75 <.0001
* Transformed Variables

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
 
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 8.4840 155.503
5 1 49.8740 9.2200 166.031
6 1 44.8110 11.6300 176.000
7 1 43.4130 11.9500 176.000
8 1 44.6435 10.8500 173.761
9 1 39.4420 13.0800 174.000
10 1 60.0550 8.6300 170.000

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
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.