## Example 57.5 Reading Generalized Linear Model Results

This example creates data sets that contains parameter estimates and corresponding covariance matrices computed by a generalized linear model 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 GENMOD to generate the parameter estimates and covariance matrix for each imputed data set:

``` proc genmod data=outmi;
model Oxygen= RunTime RunPulse/covb;
by _Imputation_;
ods output ParameterEstimates=gmparms
ParmInfo=gmpinfo
CovB=gmcovb;
run;
```

The following statements print (in Output 57.5.1) the output parameter estimates and covariance matrix from PROC GENMOD for the first two imputed data sets:

```proc print data=gmparms (obs=8);
var _Imputation_ Parameter Estimate StdErr;
title 'GENMOD Model Coefficients (First Two Imputations)';
run;
```

Output 57.5.1 PROC GENMOD Model Coefficients
 GENMOD Model Coefficients (First Two Imputations)

Obs _Imputation_ Parameter Estimate StdErr
1 1 Intercept 86.5440 9.5107
2 1 RunTime -2.8223 0.3120
3 1 RunPulse -0.0587 0.0556
4 1 Scale 2.6692 0.3390
5 2 Intercept 83.0207 8.4489
6 2 RunTime -3.0002 0.3217
7 2 RunPulse -0.0249 0.0488
8 2 Scale 2.5727 0.3267

The following statements display the parameter information table in Output 57.5.2. The table identifies parameter names used in the covariance matrices. The parameters Prm1, Prm2, and Prm3 are used for the effects Intercept, RunTime, and RunPulse, respectively, in each covariance matrix.

```proc print data=gmpinfo (obs=6);
title 'GENMOD Parameter Information (First Two Imputations)';
run;
```

Output 57.5.2 PROC GENMOD Model Information
 GENMOD Parameter Information (First Two Imputations)

Obs _Imputation_ Parameter Effect
1 1 Prm1 Intercept
2 1 Prm2 RunTime
3 1 Prm3 RunPulse
4 2 Prm1 Intercept
5 2 Prm2 RunTime
6 2 Prm3 RunPulse

The following statements display (in Output 57.5.3) the output covariance matrices from PROC GENMOD for the first two imputed data sets. Note that the GENMOD procedure computes maximum likelihood estimates for each covariance matrix.

```proc print data=gmcovb (obs=8);
var _Imputation_ RowName Prm1 Prm2 Prm3;
title 'GENMOD Covariance Matrices (First Two Imputations)';
run;
```

Output 57.5.3 PROC GENMOD Covariance Matrices
 GENMOD Covariance Matrices (First Two Imputations)

Obs _Imputation_ RowName Prm1 Prm2 Prm3
1 1 Prm1 90.453923 -0.483394 -0.497473
2 1 Prm2 -0.483394 0.0973159 -0.003113
3 1 Prm3 -0.497473 -0.003113 0.0030954
4 1 Scale 1.344E-15 -1.09E-17 -6.12E-18
5 2 Prm1 71.383332 -0.603037 -0.378616
6 2 Prm2 -0.603037 0.1034766 -0.002826
7 2 Prm3 -0.378616 -0.002826 0.0023843
8 2 Scale 1.602E-14 1.755E-16 -1.02E-16

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

```proc mianalyze parms=gmparms covb=gmcovb parminfo=gmpinfo;
modeleffects Intercept RunTime RunPulse;
run;
```

Since the GENMOD procedure computes maximum likelihood estimates for the covariance matrix, the EDF= option is not used. The resulting model coefficients are identical to the estimates in Output 57.3.3 in Example 57.3. However, the standard errors are slightly different because in this example, maximum likelihood estimates for the standard errors are combined without the EDF= option, whereas in Example 57.3, unbiased estimates for the standard errors are combined with the EDF= option.