I want to use proc surveylogistic to draw a restrictive cubic spline curve (Y-axis is the odds ratio and x-axis is the exposure), but I don't know how to use the command.
At present, I can only draw a restrictive cubic spline curve with Y-axis as the possibility. Would like to Can someone tell me how to solve it? Thank you!
Not sure if I understand the question correctly, but have you considered using the EFFECT statement to spline your X axis values?
SteveDenham
Thank you very much for your answer!
I used the EFFECT statement. However, I don't know how to further export the OR and 95CI% for each exposure.
Here are the related commands I used:
proc surveylogistic data=analysis total=totals;
strata shengfen;
cluster site_ no;
weight weight_ quanzhong;
effect dmdurationsp=spline(dmduration/naturalcubic basis=tpf(noint) knotmethod=percentiles(5) details );
class DR2fen gender/param=ref;
model DR2fen (event="1")= gender dmdurationsp age /expb;
store DR2fenmodelsp;
output out=predicted_ values pred=pred lower=lower upper=upper;
run;
The LSMEANS statement with the ODDSRATIO option should give what you want.
SteveDenham
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.