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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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