BookmarkSubscribeRSS Feed
anuli98
Calcite | Level 5

My analysis is determining the association between weight (continuous variable) and post-operative complications (yes/no). I am doing a multivariable logistic regression analysis, adjusting for seven predictors (1 has multiple categories, 5 are yes/no, and 1 is continuous). I notice that the association between weight and complication is not exactly linear, so it is recommended that I do restricted cubic splines. I was using the following code:

 

proc logistic data=weight.avg_pred_val_all_data2;

effect spl_weight = spline(weight/naturalcubic knotmethod=percentiles(5));/*natural cubic splines with knots at quartiles*/

model est_prob= spl_weight/ cl;

output out=predicted_values pred=pred;

run;

 

Where est_prob is the probability of any complication.I then plotted the unadjusted spline association between weight and probability of any complication:

 

ods graphics/height=6.5in width=10in imagename="Figure2_revised_with_cubicspline" border=off;

proc sgplot data=predicted_values noautolegend;

xaxis label='Weight (kg)';

yaxis label='Any complication' values=(0 to 60 by 5);

series x=weight y=pred/ lineattrs=(color=gray pattern=solid thickness=2);

run;

 

 

My question is, how do I show the association between weight and any complication, adjusted for my seven predictors?

5 REPLIES 5
PGStats
Opal | Level 21

If your full model doesn't involve interactions, have a look at proc gam.

PG
Ksharp
Super User
Better post it at Stat Forum , since it is a Statistical Problem. proc logistic has already built-in Graphics to display it .Check EFFECTPLOT statement : http://blogs.sas.com/content/iml/2016/03/21/statistical-analysis-stephen-curry-shooting.html
anuli98
Calcite | Level 5

Thanks for your suggestions

sasbee
Fluorite | Level 6
Hi, Is there way to output the estimate estimate from the effectplot? For example, the outcome at weight = x.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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