RCSplines

Estimating and presenting nonlinear associations and interactions with Restricted Cubic Splines (RCS)

Last updated: 2025-06-18


1. RCS to model a continuous variable in logistic and Cox regression

Supplementary material for the manuscript “Estimating and presenting nonlinear associations with Restricted Cubic Splines”, International Journal of Epidemiology 2025

R material

SAS material

Stata material

2. RCS to model a nonlinear interaction between a binary and a continuous variable

R package interactionRCS

Absolute Risks and Absolute Risk Differences from a Cox model with nonlinear interactions

3. Generalized linear model (GLM) for estimating event risks using Pseudo-values

Pseudo-values derivation and comparison with Kaplan-Meier estimates

Pseudo-values GLM with RCS to estimate nonlinear Absolute Risks and Absolute Risk Differences