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( Length Width/ details) logistic( Species= Length Height Width Height*Width/ details); var Length Height Width Species; run;
The “Model Information” table in Output 57.4.1 describes the method and options used in the multiple imputation process.
Output 57.4.1: Model Information
Model Information | |
---|---|
Data Set | WORK.FISH2 |
Method | Monotone |
Number of Imputations | 5 |
Seed for random number generator | 1305417 |
The “Monotone Model Specification” table in Output 57.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.
Output 57.4.2: Monotone Model Specification
Monotone Model Specification | |
---|---|
Method | Imputed Variables |
Regression | Height Width |
Logistic Regression | Species |
The “Missing Data Patterns” table in Output 57.4.3 lists distinct missing data patterns with corresponding frequencies and percentages. The table confirms a monotone missing pattern for these variables.
Output 57.4.3: Missing Data Patterns
Missing Data Patterns | |||||||||
---|---|---|---|---|---|---|---|---|---|
Group | Length | Height | Width | Species | Freq | Percent | Group Means | ||
Length | Height | Width | |||||||
1 | X | X | X | X | 43 | 82.69 | 41.997674 | 12.819512 | 5.359860 |
2 | X | X | X | . | 3 | 5.77 | 38.433333 | 11.797667 | 4.587667 |
3 | X | X | . | . | 4 | 7.69 | 42.275000 | 13.346750 | . |
4 | X | . | . | . | 2 | 3.85 | 40.150000 | . | . |
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 57.4.4.
Output 57.4.4: Regression Model
Regression Models for Monotone Method | |||||||
---|---|---|---|---|---|---|---|
Imputed Variable |
Effect | Obs-Data | Imputation | ||||
1 | 2 | 3 | 4 | 5 | |||
Width | Intercept | 0.00682 | 0.054140 | 0.018049 | -0.015137 | 0.024027 | 0.084643 |
Width | Length | 0.75519 | 0.838485 | 0.768945 | 0.789577 | 0.728779 | 0.631217 |
Width | Height | 0.73890 | 0.832117 | 0.831748 | 0.809482 | 0.747734 | 0.745232 |
Output 57.4.5: Logistic Regression Model
Logistic Models for Monotone Method | |||||||
---|---|---|---|---|---|---|---|
Imputed Variable |
Effect | Obs-Data | Imputation | ||||
1 | 2 | 3 | 4 | 5 | |||
Species | Intercept | 22.80713 | 22.807129 | 22.807129 | 22.807129 | 22.807129 | 22.807129 |
Species | Length | -14.44698 | -14.446980 | -14.446980 | -14.446980 | -14.446980 | -14.446980 |
Species | Height | 43.11236 | 43.112363 | 43.112363 | 43.112363 | 43.112363 | 43.112363 |
Species | Width | -9.64352 | -9.643524 | -9.643524 | -9.643524 | -9.643524 | -9.643524 |
Species | Height*Width | -9.73015 | -9.730154 | -9.730154 | -9.730154 | -9.730154 | -9.730154 |
The following statements list the first 10 observations of the data set outex4
in Output 57.4.5:
proc print data=outex4(obs=10); title 'First 10 Observations of the Imputed Data Set'; run;
Output 57.4.6: Imputed Data Set
First 10 Observations of the Imputed Data Set |
Obs | _Imputation_ | Species | Length | Height | Width |
---|---|---|---|---|---|
1 | 1 | Bream | 30.0 | 11.520 | 4.02000 |
2 | 1 | Bream | 31.2 | 12.480 | 4.30600 |
3 | 1 | Bream | 31.1 | 12.378 | 4.69600 |
4 | 1 | Bream | 33.5 | 12.730 | 4.45600 |
5 | 1 | Bream | 34.0 | 12.444 | 4.62964 |
6 | 1 | Bream | 34.7 | 13.602 | 4.92700 |
7 | 1 | Bream | 34.5 | 14.180 | 5.27900 |
8 | 1 | Bream | 35.0 | 12.670 | 4.69000 |
9 | 1 | Bream | 35.1 | 14.005 | 4.84400 |
10 | 1 | Bream | 36.2 | 14.227 | 4.95900 |
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.