Restricted cubic spline (source code)

= Restricted cubic spline

A <restricted cubic spline> represents a smooth covariate effect by joined cubic pieces, with linear tails beyond the boundary knots. It allows nonlinear regression effects while controlling extrapolation. In a <Cox proportional-hazards model>, test the nonlinear basis coefficients jointly and report the fitted log-hazard or hazard-ratio curve with uncertainty.