Cubic splines and alternatives to dichotomizing

I'm considering using cubic splines to verify the linearity assumption between a continuous variable (age) and a binary outcome (cancer risk), prior to dichotomizing age in my multivariable model.

Is there any other way to test linearity here apart from cubic splines?

What other options would I have here instead of dichotomizing (apart from splitting up age into multiple (>3) categories?)



Omega Contributor
Are you familiar with logistic regression, if so the Box-Tidwell test could work. If the test is failed then a spline could be used or spline used for strategic splits to categorize.