Hello,

I am currently working on a project that seeks to understand the relationship between socioeconomic status (one variable) and lung cancer incidence. I have 12 covariates that I control for in my Cox Model. One of them has a non-linear relationship with the probability of lung cancer. I would like to transform it into a spline (non-linear) and then include that in the model.

I do not know how to do those two specific steps: (1) spline transformation of that covariate (2) taking that non-linear term and including it in the Cox Model.

Your help and guidance are much appreciated, Yosra