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
I can't put the continuous variable in the class statement. Can anyone please help?
Tim
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.
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);
Thanks a lot for this. Just figured I should remove the lsmeans statement.
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.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.