在SAS 论坛上看到如下答复,一定程度上可以回应楼主问题:
The results are consistent with each other. Both are correct. However, they have been obtained using different expansions of the categorical variables. The GENMOD procedure employs an over parameterized model in which a set of k binary variables are produced when the number of levels of a categorical variable is k. SAS refers to this as the GLM parameterization. By default, the LOGISTIC procedure employs a model with k-1 variables in the design matrix. Moreover, the k-1 variables are not binary, but can take on one of three values: -1, 0, or 1. This sort of parameterization is referred to as effect coding.
For variable X1, columns of the design matrix given GLM coding and effect coding are as follows:
GLM coding
X1 X1_1 X1_2 X1_3
a 1 0 0
b 0 1 0
c 0 0 1
Effect coding
X1 X1_1 X1_2
a 1 0
b 0 1
c -1 -1
It can be shown that these two parameterizations will yield the same predicted response values. But the parameters do have to be interpreted differently.
If you prefer the GLM parameterization (a lot of people do), you can request that parameterization in the LOGISTIC procedure. All you have to do is change your class statement to:
class x1 x1 / param=glm;
来源:
https://communities.sas.com/t5/Statistical-Procedures/PROC-LOGISTIC-vs-PROC-GENMOD-different-results/m-p/27600#M1039
|