Examples: MIANALYZE Procedure

The following statements generate five imputed data sets to be used in this section. The data set Fitness1 was created in the section Getting Started: MIANALYZE Procedure. See "The MI Procedure" chapter for details concerning the MI procedure.

proc mi data=Fitness1 seed=3237851 noprint out=outmi;
   var Oxygen RunTime RunPulse;
run;

The Fish data described in the STEPDISC procedure are measurements of 159 fish of seven species caught in Finland’s lake Laengelmavesi. For each fish, the length, height, and width are measured. See Chapter 85, The STEPDISC Procedure, for more information.

The Fish2 data set is constructed from the Fish data set and contains two species of fish. Some values have been set to missing, and the resulting data set has a monotone missing pattern in the variables Length, Height, Width, and Species.


The following statements create the Fish2 data set. It contains two species of fish in the Fish data set.

*-----------------------------Fish2 Data-----------------------------*
| The data set contains two species of the fish (Bream and Pike)     |
| and three measurements: Length, Height, Width.                     |
| Some values have been set to missing, and the resulting data set   |
| has a monotone missing pattern in the variables                    |
| Length, Height, Width, and Species.                                |
*--------------------------------------------------------------------*;
data Fish2;
   title 'Fish Measurement Data';
   input Species $ Length Height Width @@;
   datalines;
Bream   30.0  11.520  4.020         .   31.2  12.480  4.306 
Bream   31.1  12.378  4.696     Bream   33.5  12.730  4.456 
    .   34.0  12.444   .        Bream   34.7  13.602  4.927 
Bream   34.5  14.180  5.279     Bream   35.0  12.670  4.690 
Bream   35.1  14.005  4.844     Bream   36.2  14.227  4.959 
    .   36.2  14.263   .        Bream   36.2  14.371  4.815 
Bream   36.4  13.759  4.368     Bream   37.3  13.913  5.073 
Bream   37.2  14.954  5.171     Bream   37.2  15.438  5.580 
Bream   38.3  14.860  5.285     Bream   38.5  14.938  5.198 
    .   38.6  15.633  5.134     Bream   38.7  14.474  5.728 
Bream   39.5  15.129  5.570         .   39.2  15.994   .    
Bream   39.7  15.523  5.280     Bream   40.6  15.469  6.131 
    .   40.5    .      .        Bream   40.9  16.360  6.053 
Bream   40.6  16.362  6.090     Bream   41.5  16.517  5.852 
Bream   41.6  16.890  6.198     Bream   42.6  18.957  6.603 
Bream   44.1  18.037  6.306     Bream   44.0  18.084  6.292 
Bream   45.3  18.754  6.750     Bream   45.9  18.635  6.747 
Bream   46.5  17.624  6.371 
Pike    34.8   5.568  3.376     Pike    37.8   5.708  4.158 
Pike    38.8   5.936  4.384        .    39.8    .      .    
Pike    40.5   7.290  4.577     Pike    41.0   6.396  3.977 
   .    45.5   7.280  4.323     Pike    45.5   6.825  4.459 
Pike    45.8   7.786  5.130     Pike    48.0   6.960  4.896 
Pike    48.7   7.792  4.870     Pike    51.2   7.680  5.376 
Pike    55.1   8.926  6.171        .    59.7  10.686   .    
Pike    64.0   9.600  6.144     Pike    64.0   9.600  6.144 
Pike    68.0  10.812  7.480 
;

The following statements generate five imputed data sets to be used in this section. The default regression method is used to impute missing values in continuous variables Height and Width, and the discriminant function method is used to impute the variable Species.

proc mi data=Fish2 seed=1305417 out=outfish;
   class Species;
   monotone discrim( Species= Length Height Width);
   var Length Height Width Species;
run;

Example 57.1 through Example 57.6 use different input option combinations to combine parameter estimates computed from different procedures. Example 57.7 and Example 57.8 combine parameter estimates with classification variables. Example 57.9 shows the use of a TEST statement, and Example 57.10 combines statistics that are not directly derived from procedures.