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?
You cannot write contrasts in PROC GAM or PROC GAMPL. Is there a workaround this? This is easily achieved in R for GAM models.
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;
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.