Odds ratio for ordinal variables from PROC GENMOD

给你一囗甜甜゛ 提交于 2019-12-24 06:03:32

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!