问题
I have a set of data where I am creating a logistic regression model, looking at the odds of a binary outcome variable (Therapy), with Stage as an ordinal explanatory variable (0,1,2,3,4). A1c is a continuous variable. Because each patient has two eyes, I must use the repeated subject = patientID(EyeID) statement.
The following is my code:
PROC GENMOD data=new descend;
class patientID EyeID Stage (param = ordinal) Therapy (ref ="0") Gender(ref="M") Ethnic agegroup/ PARAM=ref;
model Therapy = Stage A1c gender AGEGROUP Ethnic/ dist=bin;
repeated subject=patientID(EyeID) / corr=unstr corrw;
lsmeans Stage / ilink exp oddsratio diff cl;
run;
Because Stage is an ordinal variable, I would like to get odds ratios for Stage 4 vs 0, 3 vs 0, 2 vs 0, etc, so I put in the lsmeans statement. However, I got this error: "WARNING: The model does not have a GLM parameterization. This parameterization is required for the TEST, LSMEANS, LSMESTIMATE, and SLICE statement. These statements are ignored."
Any thoughts?
I have checked the design matrix for the class variables and they are correct.
Class Level Information
Class Value Design Variables
Stage 0 0 0 0 0
1 1.000 0 0 0
2 1.000 1.000 0 0
3 1.000 1.000 1.000 0
4 1.000 1.000 1.000 1.000
Gender F 1.000
M 0
Ethnic AA 1.000 0
As 0 1.000
C 0 0
来源:https://stackoverflow.com/questions/46748234/odds-ratio-for-ordinal-variables-from-proc-genmod