BookmarkSubscribeRSS Feed
qiqiqi
Calcite | Level 5

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!

4 REPLIES 4
SteveDenham
Jade | Level 19

Not sure if I understand the question correctly, but have you considered using the EFFECT statement to spline your X axis values?

 

SteveDenham

qiqiqi
Calcite | Level 5

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;

SteveDenham
Jade | Level 19

The LSMEANS statement with the ODDSRATIO option should give what you want.

 

SteveDenham

qiqiqi
Calcite | Level 5
Thank you very much again! I have read the LSMEANS statement , but there are somethings that I still didn't quite understand how to use LSMEANS statement to get these parameters. If I want to use the model information, and draw the RCS graph with X-axis as the dmduration(the above variable) and y-axis as the corresponding OR and 95CI%(DR2fen, the above variable).

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
  • 4 replies
  • 641 views
  • 0 likes
  • 2 in conversation