[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?
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;
Re-titled and moved to the procedures forum.
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!
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.