SAS Procedures

Help using Base SAS procedures
BookmarkSubscribeRSS Feed
jina1
Calcite | Level 5

@Rick_SAS @StatDave_sas

 

[restricted cubic splines in SAS]

Thank you so much for answering my questions quickly.  

I tried  it according to your advice, but I had another question. I want to draw a graph starting with y=1.0 (ORs) like the graph below. If you look at the graph below, it starts at (x:0.3, y:1.0). How can I draw it like the graph below?

 

 

 

 

 

 

sample .jpg

proc logistic data=hn14_18_total;

effect spl=spline(n_3kcal / details naturalcubic basis=tpf(noint)

knotmethod=percentiles(5));

model mh_PHQ_S10(event='1') = spl / selection=none alpha=0.3 ;

units n_3kcal=0.3;

oddsratio n_3kcal / at (n_3kcal=0.0163166 to 4.98120 by 0.3) cl =pl;

ods output ORplot=orp;

quit;

 

data orpgraph; set orp;

n_3kcal=input (scan (displaylabel, 0.3, "=" ), best. );

label n_3kcal="n_3kcal";

run;

 

proc sgplot data=orpgrap noautolegend;

band x=n_3kcal  upper=upperCLdispl;ay lower=lowerCLdisplay;

series x=n_3kcal y=addsRatioEstDisplay;

yaxis label="odds Ratio";

run;

 

 

 

1 REPLY 1
ChrisNZ
Tourmaline | Level 20

Re-titled and moved to the procedures forum.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 759 views
  • 0 likes
  • 2 in conversation