RCSplines
Software material for estimating and presenting nonlinear associations and interactions with Restricted Cubic Splines
Install / Use
/learn @andreabellavia/RCSplinesREADME
Estimating and presenting nonlinear associations and interactions with Restricted Cubic Splines (RCS)
Last updated: 2025-06-18
- Slides for the Harvard Catalyst seminar on January 29, 2025
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
- Dataset used for the examples
R material
-
Code to reproduce the logistic and Cox regression examples
-
Output for the examples in html format
-
Functions used for the examples
SAS material
-
Macros to plot ORs from a logistic model: unadjusted models / adjusted models
-
Macros to plot HRs from a Cox model: unadjusted models / adjusted models
-
Macros to plot predicted probabilities after logistic model: unadjusted models / adjusted models
-
Macros to plot absolute risks after Cox model: unadjusted models / adjusted models
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
-
Supplemenraty material for the paper “Estimating and presenting hazard ratios and absolute risks from a Cox model with complex nonlinear interactions” published in the American Journal of Epidemiology (2024)
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
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
