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
... View more