# The MIANALYZE Procedure

### Example 76.9 Reading Nominal Logistic Model Results

This example creates data sets to contain parameter estimates that are computed by a nominal logistic regression analysis for a set of imputed data sets. These estimates are then combined to generate valid statistical inferences about the model parameters.

The following statements use PROC LOGISTIC to generate the parameter estimates and covariance matrix for each imputed data set:

```ods select none;
proc logistic data=outfish3;
class Species;
model Species= Length Width / link=glogit covb;
by _Imputation_;
ods output ParameterEstimates=lgsparms
CovB=lgscovb;
run;
ods select all;
```

Because of the ODS SELECT statements, no output is displayed. The following statements display (in Output 76.9.1) the output logistic regression coefficients from PROC LOGISTIC for the first two imputed data sets:

```proc print data=lgsparms (obs=12);
title 'LOGISTIC Model Coefficients (First Two Imputations)';
run;
```

Output 76.9.1: PROC LOGISTIC Model Coefficients

 LOGISTIC Model Coefficients (First Two Imputations)

Obs _Imputation_ Variable Response DF Estimate StdErr WaldChiSq ProbChiSq _ESTTYPE_
1 1 Intercept Parkki 1 1.7737 1.7712 1.0029 0.3166 MLE
2 1 Intercept Perch 1 1.1036 1.3426 0.6757 0.4111 MLE
3 1 Length Parkki 1 -0.0353 0.2700 0.0171 0.8960 MLE
4 1 Length Perch 1 -0.8560 0.2635 10.5529 0.0012 MLE
5 1 Width Parkki 1 -0.3784 1.6650 0.0517 0.8202 MLE
6 1 Width Perch 1 5.6213 1.6333 11.8455 0.0006 MLE
7 2 Intercept Parkki 1 2.3507 1.7930 1.7188 0.1898 MLE
8 2 Intercept Perch 1 0.6321 1.3370 0.2235 0.6364 MLE
9 2 Length Parkki 1 -0.3479 0.2460 2.0004 0.1573 MLE
10 2 Length Perch 1 -0.6108 0.2130 8.2274 0.0041 MLE
11 2 Width Parkki 1 1.5786 1.5300 1.0645 0.3022 MLE
12 2 Width Perch 1 4.1610 1.3110 10.0734 0.0015 MLE

The following statements display the covariance matrices that are associated with parameter estimates derived from the first two imputations in Output 76.9.2:

```proc print data=lgscovb (obs=12);
title 'LOGISTIC Model Covariance Matrices (First Two Imputations)';
run;
```

Output 76.9.2: PROC LOGISTIC Covariance Matrices

 LOGISTIC Model Covariance Matrices (First Two Imputations)

Obs _Imputation_ Parameter Intercept_Parkki Intercept_Perch Length_Parkki Length_Perch Width_Parkki Width_Perch
1 1 Intercept_Parkki 3.137016 1.150943 -0.25136 -0.11416 0.857307 0.484917
2 1 Intercept_Perch 1.150943 1.80259 -0.12448 -0.16709 0.557913 0.676397
3 1 Length_Parkki -0.25136 -0.12448 0.072903 0.028705 -0.43386 -0.16464
4 1 Length_Perch -0.11416 -0.16709 0.028705 0.069437 -0.16666 -0.42309
5 1 Width_Parkki 0.857307 0.557913 -0.43386 -0.16666 2.77239 1.00217
6 1 Width_Perch 0.484917 0.676397 -0.16464 -0.42309 1.00217 2.66758
7 2 Intercept_Parkki 3.214747 1.25981 -0.19425 -0.10076 0.436385 0.365388
8 2 Intercept_Perch 1.25981 1.787564 -0.11454 -0.13446 0.460885 0.463036
9 2 Length_Parkki -0.19425 -0.11454 0.060501 0.029263 -0.35903 -0.17062
10 2 Length_Perch -0.10076 -0.13446 0.029263 0.04535 -0.17499 -0.27173
11 2 Width_Parkki 0.436385 0.460885 -0.35903 -0.17499 2.34089 1.081586
12 2 Width_Perch 0.365388 0.463036 -0.17062 -0.27173 1.081586 1.718756

The following statements use the MIANALYZE procedure with the input PARMS= and COVB= data sets:

```proc mianalyze parms(link=glogit)=lgsparms
covb(effectvar=stacking)=lgscovb
mult;
modeleffects Intercept Length Width;
run;
```

The "Variance Information" table in Output 76.9.3 displays the between-imputation, within-imputation, and total variances for combining complete-data inferences.

Output 76.9.3: Variance Information

The MIANALYZE Procedure

Variance Information (25 Imputations)
Parameter Response Variance DF Relative
Increase
in Variance
Fraction
Missing
Information
Relative
Efficiency
Between Within Total
Intercept Parkki 0.539659 3.540706 4.101951 1282 0.158512 0.138167 0.994504
Intercept Perch 0.182814 1.502203 1.692330 1901.5 0.126565 0.113278 0.995489
Length Parkki 0.069216 0.089623 0.161607 120.96 0.803187 0.454374 0.982149
Length Perch 0.027025 0.047967 0.076073 175.82 0.585945 0.376513 0.985163
Width Parkki 3.131748 3.792307 7.049325 112.43 0.858849 0.471354 0.981495
Width Perch 1.079472 1.816671 2.939322 164.52 0.617972 0.389321 0.984666

The "Parameter Estimates" table in Output 76.9.4 displays the combined parameter estimates and their associated standard errors.

Output 76.9.4: Parameter Estimates

Parameter Estimates (25 Imputations)
Parameter Response Estimate Std Error 95% Confidence Limits DF Minimum Maximum Theta0 t for H0:
Parameter=Theta0
Pr > |t|
Intercept Parkki 1.247968 2.025327 -2.72535 5.22129 1282 -0.450300 2.607579 0 0.62 0.5379
Intercept Perch 0.466573 1.300896 -2.08476 3.01791 1901.5 -0.536319 1.129313 0 0.36 0.7199
Length Parkki 0.285276 0.402004 -0.51060 1.08115 120.96 -0.347887 0.748875 0 0.71 0.4793
Length Perch -0.566649 0.275813 -1.11098 -0.02232 175.82 -0.856010 -0.254865 0 -2.05 0.0414
Width Parkki -2.531763 2.655056 -7.79220 2.72867 112.43 -5.690349 1.578570 0 -0.95 0.3424
Width Perch 3.835827 1.714445 0.45068 7.22098 164.52 1.818114 5.621285 0 2.24 0.0266

The "Multivariate Inference" table in Output 76.9.5 displays multivariate inference for the parameters assuming proportionality of the between-imputation and within-imputation covariance matrices.

Output 76.9.5: Multivariate Inference

Multivariate Inference
Assuming Proportionality of Between/Within Covariance Matrices
Avg Relative
Increase
in Variance
Num DF Den DF F for H0:
Parameter=Theta0
Pr > F
0.321721 6 2317.5 3.14 0.0046