This repository presents a complete survival analysis of HIV patients who experienced failure with zidovudine therapy, using the aids
and aids.id
datasets from the JM
package. The project showcases not only advanced modeling but also careful data exploration, assumption checking, and clear interpretation using reproducible R workflows.
survival_analysis_practice/
├── LICENSE
├── README.md
├── rendered_docs/ # Contains all the processed reports
│ ├── Appendix_Rajaram.pdf
│ ├── Codes_Rajaram_1.pdf
│ ├── Codes_Rajaram.pdf
│ └── Project_Rajaram.pdf
├── RMD/ # All the RMarkdown files for code, analysis, and interpretation
│ ├── Appendix_Rajaram.rmd
│ ├── Codes_Rajaram_1.rmd
│ ├── Codes_Rajaram.rmd
│ └── Project_Rajaram.rmd
└── survival_analysis_practice.Rproj # RStudio project file
Main interpretive report
- Explores patient-level and clinical variables
- Fits Kaplan-Meier curves, Cox models (time-independent and time-dependent), and AFT models (Weibull, Log-normal)
- Includes PH assumption checks, functional form checks, and influence diagnostics
- Tables and figures are generated using external scripts (from
Codes_Rajaram.rmd
) - Presents tidy summaries, interpretation of outputs, and conclusions
Code script for core analysis
- All code for:
- Data preprocessing
- Model fitting (KM, Cox, AFT)
- Assumption diagnostics
- Summary tables and visualizations
- Modularized and structured to support the main report (
Project_Rajaram.rmd
) and appendix
Supplementary outputs
- Additional figures and tables referenced in the main report
- Includes diagnostics and stratified plots to support interpretation
- All outputs generated from
Codes_Rajaram.rmd
Standalone full code notebook
- Contains all code chunks used in
Codes_Rajaram
,Project_Rajaram
andAppendix_Rajaram
in a single file - Suitable for full replication of the entire workflow
- Does not include narrative interpretations
- Survival analysis: KM curves, Cox PH models, AFT models
- Time-varying covariates and PH assumption testing
- Residual diagnostics and model validation
- Tidyverse-based data processing and
broom
-style model outputs - Clean modular RMarkdown structure for reproducibility
- Tidy tables (
gt
), visualizations (ggplot2
), and interpretive scientific writing
Available in the rendered_docs/
folder:
Project_Rajaram.pdf
: Main interpretive analysisCodes_Rajaram.pdf
: Modular code and generation of outputsAppendix_Rajaram.pdf
: Additional plots, tables, and figuresCodes_Rajaram_1.pdf
: Self-contained code-only notebook
- Clone this repo and open
survival.Rproj
in RStudio - Navigate to the
RMD/
folder - Knit
Project_Rajaram.rmd
to produce the main report - Use
Codes_Rajaram.rmd
to generate and update output tables/figures - Use
Codes_Rajaram_1.rmd
as a full standalone code reference