BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
timothy19
Fluorite | Level 6

Hi Everyone,

 

I am trying to perform regression analysis with binary outcome and continuous predictors with repeated measurement on subjects. 

proc glimmix data=data;
where position="Post";
      class sub_id;
      model y_variable (event="1") =  Force_N10 Resistance__ohms10 Time_in_Seconds  Resistance__ohms10*Force_N10/ solution dist=binary link=logit ddfm=satterth oddsratio;
      random intercept / subject=sub_id solution;
nloptions tech=nrridg;
lsmeans Resistance__ohms10 / cl ilink plots=mean(ilink cl);
ods exclude solutionr;run;

I tried to use the code above but got the error below

timothy19_0-1668101212460.png

I can't put the continuous variable in the class statement. Can anyone please help?

Tim


1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

If you remove the LSMEANS statement, which can't be used for continuous variables, the ODDSRATIO option that you have in the MODEL statement will provide a table showing the odds ratio for each variable in the interaction for a unit change. 

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

I think the message is clear, you can't do that. It also doesn't make any mathematical or logical sense to compute LSMEANS on a continuous variable.

 

What is it you are trying to learn here from Resistance__ohms10? If it is what your title says "odds ratio ... for continuous predictors with interaction", maybe something like this from the GLIMMIX documentation is what you want:

 

model y = A x A*x / dist=binary oddsratio(at x=3);
--
Paige Miller
timothy19
Fluorite | Level 6

Thanks a lot for this. Just figured I should remove the lsmeans statement.

StatDave
SAS Super FREQ

If you remove the LSMEANS statement, which can't be used for continuous variables, the ODDSRATIO option that you have in the MODEL statement will provide a table showing the odds ratio for each variable in the interaction for a unit change. 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is ANOVA?

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.

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