BookmarkSubscribeRSS Feed
levender8622
Fluorite | Level 6

Hello,

I'm fitting a multinomial regression using PROC GEE because I have repeated measures. I have an interaction in my model, so I need to use ESTIMATE statement to get OR and CI. My response variable is "smoke" which has three levels: "Never", "Past", and "Current", and I want to use "Never" as the reference. The code I used was as follows (simplified as an example):

proc gee data=mydata;
	class IDsurv(ref="No") smoke(ref='Never') taskcpt_cat/order=internal param=ref ref=first;
	model smoke=surv taskcpt_cat surv*taskcpt_cat / dist = mult link = glogit;
	repeated subject=ID/type=ind;
	weight wgt;
	estimate 'Survivor vs Sibling taskcpt=Impaired' surv 1 -1 surv*taskcpt_cat 1 0 -1/exp cl category=joint;
run;

The model output was as expected as well as the output from ESTIMATE statement:

p1.jpg

Since I also need to adjust for age, which was treated as cubic splines, I added the four spline variables for age into the model:

proc gee data=mydata;
	class ID surv(ref="No") smoke(ref='Never') taskcpt_cat/order=internal param=ref ref=first;
	model smoke=surv taskcpt_cat surv*taskcpt_cat ageX1 ageX2 ageX3 ageX4 / dist = mult link = glogit;
	repeated subject=ID/type=ind;
	weight wgt;
	estimate 'Survivor vs Sibling taskcpt=Impaired' surv 1 -1 surv*taskcpt_cat 1 0 -1/exp cl category=joint;
run;

However this time although the model output still looked right (use "Never" as the reference), output from ESTIMATE statement always returned estimates for "Never" and "Past" no matter what I tried (change options in estimate statement and recode my response variable):

p2.jpg

Could anyone help with any suggestions or detecting possible problems in my data/coding? Thank you very much!

3 REPLIES 3
sbxkoenk
SAS Super FREQ

Hello,

 

Look here :

SAS Usage Note 24447: Examples of writing CONTRAST and ESTIMATE statements

https://support.sas.com/kb/24/447.html

( Look for GEE , ... gives 3 hits )

 

General rule :

first try LSMESTIMATE statement (with or without SLICE statement)

, before turning to ESTIMATE statement.

The former is / are much more straightforward to use.

If LSMESTIMATE is not appropriate for your research question, turn to ESTIMATE.

 

I admit I haven't read your post in-depth.
Will do so after the weekend. 
Maybe @StatDave will be ahead of me.

Good luck,

Koen

levender8622
Fluorite | Level 6

Hello @sbxkoenk ,

Thank you so much. I looked into LSMEANS and tried it and got the same problem: it couldn't return the estimate for the desired levels of "smoke". In addition, I actually found out it was the age variables that caused this problem: if I remove ageX1 - ageX4, then I can get estimates for "Past" and "Current" levels as needed. When I looked more into it, I realized the cause of this problem was the continuous variable: no matter how many categorical variables I adjusted in the model, I can get the estimates for the response levels I needed, using either ESTIMATE or LSMEANS. However, whenever I added in continuous variable(s) (I have other continuous variables in my data), I couldn't get the desired estimates for the levels I needed. Strangely enough, with continuous variable(s) in my model, I tried different reference levels and different formats and both ESTIMATE and LSMEANS statements, it always gave me the estimates for the reference level and another level (and this level could change depending on which reference level or formats or statement I tried).  

Now I start to wonder if this is really something due to my coding/data problem...

StatDave
SAS Super FREQ
Make sure you check the SAS log and your output for any messages such as an indication of omitted observations due to missing values. I think the best way to resolve this is for you to provide the input data.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 715 views
  • 0 likes
  • 3 in conversation