BookmarkSubscribeRSS Feed
PamG
Quartz | Level 8

Is there a way I can report odds ratio comparing 2 points for a GAM model?

 

proc gampl data=mydata;
   class gender / param=ref;
   model response(event='1') = gender spline(age)  / dist=binary link=logit;
run;

  For eg, is there a way, I can report OR at say  age=65 to age=75?   I know that R has an package, oddsratio specifically for GAM to get such odds ratios.  How can we replicate something similar in SAS?

3 REPLIES 3
Ksharp
Super User
Since you are asking OR for a SPLINE effect(a.k.a a non-linear effect), that is not easy to get it.
I think you need help from macro %margin , %nlmeans:
https://support.sas.com/kb/35/189.html
PamG
Quartz | Level 8

You cannot write contrasts in PROC GAM or PROC GAMPL.  Is there a workaround this? This is easily achieved in R for GAM models.

StatDave
SAS Super FREQ

You can fit a Generalized Additive logistic model to a binary response and obtain odds ratio estimates using the EFFECT statement in PROC LOGISTIC. The EFFECT statement creates the spline effect that you can use in the model. See the example in this note. In addition to the ODDSRATIO statement, you'll use the UNITS statement to specify the interval size that you want. For example :  

proc logistic data=mydata;
effect spla=spline(age/naturalcubic basis=tpf(noint));
class gender / param=ref;
model response(event='1') = gender spla;
oddsratio age / at(age=65);
units age=10;
run;
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
  • 118 views
  • 0 likes
  • 3 in conversation