Hello, I am conducting an analysis to evaluate the relationship between several binary outcomes (death, blood transfusion, 30-day readmission) and a continuous predictor (number of surgeries done at a hospital). I would also like to adjust my model for covariates (age, sex, cardiac anomaly). My objective is to visually examine whether there exists an inflection point, indicating a number of surgeries, where the probability of the outcome changes. There is a paper by Ravi et al. (https://www.bmj.com/content/348/bmj.g3284) that conducted an analysis similar to what I'm hoping to do, using restricted cubic spline plots. My current approach was to use PROC LOGISTIC with the EFFECTS function for restricted cubic splines, and then plot the predicted probabilities, but I am having trouble with graphing the output though and could use some help. I also appreciate any feedback on my approach/coding in general. So far, this is what I am using: proc logistic data = have outdesignonly;
effect spl = spline (surgeries / details naturalcubic basis= tpf(noint) knotmethod= percentiles(3));
class sex (ref=0) cardiac_anomaly (ref=0)/ param=ref;
model blood_transfusion = surgeries age sex cardiac_anomaly;
output out= splineout predicted= fit;
run;
title "Restricted Cubic Spline Regression for Blood Transfusion";
proc sgplot data= splineout noautolegend;
scatter x= surgeries y=fit/ lineattrs= (thickness =3 color=red);
run; I have chosen 3 knots because my sample is relatively small (n ~500). Eventually, I would like to be able to plot an overlay plot for the various outcomes, but I am also unclear on how this could be achieved. Thank you in advance for any suggestions!
... View more