Hello,
I am struggling with codes for multinomial ordinal(4 levels) longitudinal regression and its interpretation. The outcome variable has 4 levels which are ordered. I used proc GENMOD and Proc GEE and the results are very different. I also need help with the interpretation. Initially I was hoping to get the differences of least squares means for each level of the outcome and predictor variable but it does not appear to give such results or am I doing it wrong. Please, I need help.
Thank you
PROC GENMOD DATA=COVERED.Demographics ;
CLASS complete_adherence2(ref='1') record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity
/ DIST=MULTINOMIAL LINK=CUMLOGIT;
REPEATED SUBJECT=record_id/ corr=indep;
lsmeans ethnicity/ ILINK diff e cl oddsratio ;
RUN;
PROC GEE DATA=COVERED.Demographics DESCENDING;
CLASS complete_adherence2(ref='1') week record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity/ DIST=MULTINOMIAL;
REPEATED SUBJECT=record_id / TYPE =indep WITHIN=week LOGOR=EXCH;
lsmeans ethnicity/ ILINK diff e cl oddsratio ;
RUN;
Result from PROC GENMOD
Result from PROC GEE
I was able to get identical results with the following code
PROC GENMOD DATA=COVERED.Demographics desc;
CLASS complete_adherence2(ref='1') record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity
/ DIST=MULTINOMIAL LINK=cLOGIT;
REPEATED SUBJECT=record_id/ corr=indep;
lsmeans ethnicity/ ILINK diff e cl oddsratio ;
RUN;
PROC GEE DATA=COVERED.Demographics desc;
CLASS complete_adherence2(ref='1') record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity/ DIST=MULTINOMIAL LINK=CUMLOGIT;
REPEATED SUBJECT=record_id / TYPE =indep ;
lsmeans ethnicity/ ILINK diff e cl oddsratio ;
RUN;
I recommend that you start by making the code the same in both procs except for "GEE" vs "GENMOD". DESCENDING should be removed or used in both procs - it reverses the order of the response levels and will certainly change the results. You use the WITHIN= and LOGOR= options only in one of the two procs. With LOGOR, a very different model is fit, so only one of TYPE= or LOGOR= should be specified.
Thank you for your response. I made the two models as identical as possible but it did not help.
The following is my code and the results.
Thank you.
PROC GENMOD DATA=COVERED.Demographics ;
CLASS complete_adherence2(ref='1') record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity
/ DIST=MULTINOMIAL LINK=CUMLOGIT;
REPEATED SUBJECT=record_id/ corr=indep;
lsmeans ethnicity/ ILINK diff e cl oddsratio ;
RUN;
PROC GEE DATA=COVERED.Demographics ;
CLASS complete_adherence2(ref='1') record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity/ DIST=MULTINOMIAL LINK=CUMLOGIT;
REPEATED SUBJECT=record_id / TYPE =indep ;
lsmeans ethnicity/ ILINK diff e cl oddsratio ;
RUN;
The result from PROC GENMOD
The result from PROC GEE
Could you post both the LOG and the full output from the two procedures?
I was able to get identical results with the following code
PROC GENMOD DATA=COVERED.Demographics desc;
CLASS complete_adherence2(ref='1') record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity
/ DIST=MULTINOMIAL LINK=cLOGIT;
REPEATED SUBJECT=record_id/ corr=indep;
lsmeans ethnicity/ ILINK diff e cl oddsratio ;
RUN;
PROC GEE DATA=COVERED.Demographics desc;
CLASS complete_adherence2(ref='1') record_id ethnicity (ref='1');
MODEL complete_adherence2 = ethnicity/ DIST=MULTINOMIAL LINK=CUMLOGIT;
REPEATED SUBJECT=record_id / TYPE =indep ;
lsmeans ethnicity/ ILINK diff e cl oddsratio ;
RUN;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.