- Added main section:
## Survival Analysis - Improved subsections with consistent capitalization:
### Introduction to Survival Analysis### Loading Packages and Importing Data### Kaplan-Meier Survival Curves# Log-Rank Test→# Log-Rank Test(kept as section, not subsection)### Bonus: Publication-Ready Survival Plots with ggsurvfit### Introduction to Cox Proportional Hazards Regression### Univariable Cox Regression Models(NEW - separated from univariable code)### Multivariable Cox Proportional Hazards Regression
- Standardized to title case throughout
- "Intro" → "Introduction"
- "BY-SEX" → "By Sex"
- Consistent formatting across all sections
Callout: Important - Censoring
- Explains the critical concept of "censoring" in survival data
- Clarifies what censoring means (e.g., patient still alive at study end)
- Emphasizes importance of proper censoring handling
- Distinguishes between events and censored observations
Callout: Note - Data Preparation
- Lists three key components: start time, time to event, event indicator
- Emphasizes data format verification before analysis
- Practical guidance for survival analysis data structure
Callout: Tip - The Kaplan-Meier Method
- Non-parametric nature and minimal assumptions
- Key features: starts at 100%, steps down at events
- Accounts for censoring at each time point
- Explains what the curve shows (cumulative survival probability)
Enhanced text:
- Added "Key characteristics" bullet list
- Clarified role of confidence intervals
- Explained marks on curve showing event times
Callout: Important - Comparing Survival Curves
- Clear null hypothesis statement
- How test statistic is calculated
- Non-informative censoring assumption
- Key limitation: tests for difference but doesn't quantify it
- Leads naturally to Cox regression for effect sizes
Enhanced text:
- Separated motivation from technical details
- Added distinction between log-rank and Cox regression
- Clarified that effect sizes come from Cox, not log-rank
- Renamed to "Bonus: Publication-Ready Survival Plots with ggsurvfit"
- Makes purpose clear (polished/publication formatting)
Callout: Tip - Hazard Ratio Interpretation
- Clear enumeration of HR = 1.0, >1.0, <1.0 meanings
- CI interpretation for statistical significance
- Practical clinical interpretation
Bullet list of advantages:
- Multiple variables simultaneously
- Estimates effect sizes (hazard ratios)
- Adjusts for confounding
- Models instantaneous risk over time
- NEW subsection highlighting univariable models
- Separated from multivariable for clarity
Callout: Note - Univariable vs. Multivariable
- Explains confounding in univariable models
- Concrete example: age vs. hypertension correlation
- Motivation for multivariable approach
Callout: Important - Multivariable Adjustment
- Explains "holding other variables constant"
- Four key benefits:
- Reduces confounding
- Tests adjusted associations
- Compares relative importance
- Assumes proportional hazards (hints at diagnostics)
Callout: Tip - Reading Cox Model Output
- Explains each output component:
- Estimate (log hazard)
- Hazard Ratio (exp(coef))
- 95% Confidence Interval
- p-value
- Model comparison strategy
The document now guides learners through:
- Conceptual foundation (censoring, what survival analysis does)
- Data setup (proper format and verification)
- Visual exploration (Kaplan-Meier curves)
- Comparison testing (log-rank test)
- Effect quantification (univariable Cox models)
- Multivariable modeling (adjusted hazard ratios)
- Publication formatting (polished tables and figures)
- Important (4 callouts): Censoring, log-rank assumptions, multivariable adjustment, Cox output
- Tip (3 callouts): Kaplan-Meier method, HR interpretation, reading Cox output
- Note (2 callouts): Data preparation, univariable vs. multivariable
Total: 9 callouts strategically placed for learning progression