This example uses logistic regression method to impute values for a binary variable in a data set with a monotone missing pattern.
In the following statements, the logistic regression method is used for the binary CLASS variable Species
:
proc mi data=Fish2 seed=1305417 out=outex4; class Species; monotone reg( Width/ details) logistic( Species= Length Width Length*Width/ details); var Length Width Species; run;
The "Model Information" table in Output 63.4.1 describes the method and options used in the multiple imputation process.
The "Monotone Model Specification" table in Output 63.4.2 describes methods and imputed variables in the imputation model. The procedure uses the logistic regression method to impute
the variable Species
in the model. Missing values in other variables are not imputed.
The "Missing Data Patterns" table in Output 63.4.3 lists distinct missing data patterns with corresponding frequencies and percentages. The table confirms a monotone missing pattern for these variables.
When you use the DETAILS option, parameters estimated from the observed data and the parameters used in each imputation are displayed in the "Logistic Models for Monotone Method" table in Output 63.4.4.
Output 63.4.5: Logistic Regression Model
Logistic Models for Monotone Method | |||||||
---|---|---|---|---|---|---|---|
Imputed Variable |
Effect | Obs-Data | Imputation | ||||
1 | 2 | 3 | 4 | 5 | |||
Species | Intercept | -3.93577 | -5.016163 | -3.422209 | -4.706398 | -2.049090 | -4.568278 |
Species | Length | 10.41940 | 16.262215 | 6.082966 | 9.832246 | 4.992717 | 11.886805 |
Species | Width | -14.56630 | -21.856472 | -8.653119 | -15.534802 | -7.401465 | -15.621272 |
Species | Length*Width | -0.48936 | -0.208880 | 0.795883 | -0.011135 | -0.461227 | 0.080406 |
The following statements list the first 10 observations of the data set Outex4
in Output 63.4.6:
proc print data=outex4(obs=10); title 'First 10 Observations of the Imputed Data Set'; run;
Output 63.4.6: Imputed Data Set
First 10 Observations of the Imputed Data Set |
Obs | _Imputation_ | Species | Length | Width |
---|---|---|---|---|
1 | 1 | Parkki | 16.5 | 2.32650 |
2 | 1 | Parkki | 17.4 | 2.31420 |
3 | 1 | Parkki | 19.8 | 2.20482 |
4 | 1 | Parkki | 21.3 | 2.91810 |
5 | 1 | Parkki | 22.4 | 3.29280 |
6 | 1 | Perch | 23.2 | 3.29440 |
7 | 1 | Parkki | 23.2 | 3.41040 |
8 | 1 | Parkki | 24.1 | 3.15710 |
9 | 1 | Perch | 25.8 | 3.66360 |
10 | 1 | Parkki | 28.0 | 4.14400 |
Note that a missing value of the variable Species
is not imputed if the corresponding covariates are missing and not imputed, as shown by observation 4 in the table.