Dear all,
I am trying to assess the association between breastfeeding and risk of type 2 diabetes, so far the association appears to be nonlinear. Do you know how I can assess the non-linear association when using a Cox proportional hazards regression model?
Thanks,
Monica
It might help get a more targeted response by showing the code and the output you used and to identify the non-linear association.
Some description of the input data, such as a few rows of example data, might also help.
Hi Ballardw,
I am using the proc phreg for Cox regression model, the time variable is "follow_timedx_yrs" (person-years), the case is "definicion11_1" (values 0 and 1) and the exposure are the dummies for lactationcat.
Below the code to run the unadjusted model and the output:
/*Unadjusted model*/
proc phreg data=diabetes2;
model follow_timedx_yrs*definicion11_1(0) = lactationcat_1 lactationcat_2 lactationcat_3 lactationcat_4/rl;
run;
Attached the output.
I see that there is a non-linear association, I mean I would expect to have decreased risk for diabetes for the longer duration of breastfeeding, but this is not the case.
Some time ago I run regression models with restricted cubic splines using the code of Dr. Rick Wicklin but now I don't know how to do it when using Cox regression models.
Thanks,
Monica
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!
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.