RPubs will retire in June 2027. Your existing documents will stay accessible through December 31, 2031
and Connect Cloud is the recommended home for new publishing. Read the blog post

Recently Published

Plot
Plot
Plot
Plot
Plot
Survival Analysis of a UK synthetic cardiovascular cohort
Background Cardiovascular disease (CVD) event prediction (heart attack or stroke) is a classic time-to-event problem. Accurate prognostic models guide prevention and resource allocation. High-quality survival analysis requires attention to censoring/time dependence, competing risks, calibration, and generalizability. Primary aims Build and validate multivariable prognostic models predicting time to first major CVD event (composite: heart attack or stroke). Explore non-linear and time-dependent effects of predictors (age, sex, smoking, blood pressure, BMI, lung function). Account for competing risks (non-CVD death) using Fine–Gray model. Produce robust internal validation (bootstrap optimism correction) and temporal validation (train/test split by calendar time). Investigate causal effect of a binary “treatment” (e.g., antihypertensive therapy) using IPTW as sensitivity analysis. Provide clinical utility assessment (calibration, decision curves).
Plot
Plot
Plot
Plot
Plot