Add R packages overview to survival analysis chapter#349
Add R packages overview to survival analysis chapter#349
Conversation
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
… capitalization, use HTTPS Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive documentation of the R survival analysis ecosystem to help readers navigate available tools in the survival analysis chapter.
Changes:
- Adds new section documenting core, visualization, and specialized modeling packages for survival analysis
- Provides package selection guidance organized by use case
- Updates WORDLIST with relevant technical terms
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
_sec-surv-r-packages-overview.qmd |
New comprehensive overview of R packages for survival analysis, including core packages, visualization tools, and specialized modeling packages with usage guidance |
intro-to-survival-analysis.qmd |
Integrates the new packages overview section after the "Using the survival package in R" section |
inst/WORDLIST |
Adds technical terms used in the new content (package names, author names, and survival analysis terminology) |
_sec-surv-r-packages-overview.qmd
Outdated
| - Produces publication-ready legends without showing raw variable names | ||
| - All plot elements are native ggplot2 layers, | ||
| making customization straightforward | ||
| - Available on [CRAN](https://cran.r-project.org/package=ggsurvfit) and [GitHub](https://github.com/pharmaverse/ggsurvfit) |
There was a problem hiding this comment.
The CRAN link for ggsurvfit uses a different URL pattern than the other CRAN package links in this file. The survival, survminer, and ggfortify packages all use the pattern https://cran.r-project.org/web/packages/PACKAGE/index.html, but ggsurvfit uses https://cran.r-project.org/package=ggsurvfit. While both URL formats are valid CRAN URLs, using a consistent format throughout the document would improve maintainability. Consider changing this to https://cran.r-project.org/web/packages/ggsurvfit/index.html to match the other CRAN package links.
| - Available on [CRAN](https://cran.r-project.org/package=ggsurvfit) and [GitHub](https://github.com/pharmaverse/ggsurvfit) | |
| - Available on [CRAN](https://cran.r-project.org/web/packages/ggsurvfit/index.html) and [GitHub](https://github.com/pharmaverse/ggsurvfit) |
There was a problem hiding this comment.
Fixed in commit 2e5831b. Changed to use the consistent CRAN URL pattern matching other packages in the document.
_sec-surv-r-packages-overview.qmd
Outdated
| - **`flexsurv`**: Flexible parametric survival models with a wide range of distributions | ||
| - **`rms`** (Regression Modeling Strategies): | ||
| Advanced regression modeling including survival models with tools for model validation and calibration | ||
| - **`cmprsk`**: Competing risks regression using the Fine-Gray model | ||
| - **`mstate`**: Multi-state survival models for complex event histories | ||
| - **`timereg`**: Flexible regression models for survival data, | ||
| including additive hazards models | ||
| - **`frailtypack`**: Frailty models for clustered or recurrent event data | ||
| - **`riskRegression`**: Risk prediction models and performance evaluation | ||
| - **`pec`**: Prediction error curves for survival model validation | ||
| - **`prodlim`**: Fast estimation of survival models including competing risks |
There was a problem hiding this comment.
The packages listed in the "Additional Modeling Packages" section lack hyperlinks to their documentation, which is inconsistent with the "Visualization Packages" section where all packages include links to their documentation. Adding CRAN links (and GitHub links where relevant) for these packages would make it easier for readers to find more information. For example, flexsurv, cmprsk, mstate, etc. should have links to their CRAN pages similar to how survival, ggsurvfit, survminer, and ggfortify are documented.
| - **`flexsurv`**: Flexible parametric survival models with a wide range of distributions | |
| - **`rms`** (Regression Modeling Strategies): | |
| Advanced regression modeling including survival models with tools for model validation and calibration | |
| - **`cmprsk`**: Competing risks regression using the Fine-Gray model | |
| - **`mstate`**: Multi-state survival models for complex event histories | |
| - **`timereg`**: Flexible regression models for survival data, | |
| including additive hazards models | |
| - **`frailtypack`**: Frailty models for clustered or recurrent event data | |
| - **`riskRegression`**: Risk prediction models and performance evaluation | |
| - **`pec`**: Prediction error curves for survival model validation | |
| - **`prodlim`**: Fast estimation of survival models including competing risks | |
| - **[`flexsurv`](https://cran.r-project.org/package=flexsurv)**: Flexible parametric survival models with a wide range of distributions | |
| - **[`rms`](https://cran.r-project.org/package=rms)** (Regression Modeling Strategies): | |
| Advanced regression modeling including survival models with tools for model validation and calibration | |
| - **[`cmprsk`](https://cran.r-project.org/package=cmprsk)**: Competing risks regression using the Fine-Gray model | |
| - **[`mstate`](https://cran.r-project.org/package=mstate)**: Multi-state survival models for complex event histories | |
| - **[`timereg`](https://cran.r-project.org/package=timereg)**: Flexible regression models for survival data, | |
| including additive hazards models | |
| - **[`frailtypack`](https://cran.r-project.org/package=frailtypack)**: Frailty models for clustered or recurrent event data | |
| - **[`riskRegression`](https://cran.r-project.org/package=riskRegression)**: Risk prediction models and performance evaluation | |
| - **[`pec`](https://cran.r-project.org/package=pec)**: Prediction error curves for survival model validation | |
| - **[`prodlim`](https://cran.r-project.org/package=prodlim)**: Fast estimation of survival models including competing risks |
There was a problem hiding this comment.
Fixed in commit 2e5831b. Added CRAN links to all packages in the Additional Modeling Packages section using the same URL pattern as the visualization packages.
|
intro-to-survival-analysis.qmd
Outdated
| @@ -47,6 +47,10 @@ The term *survival analysis* is a bit misleading. Survival outcomes can sometime | |||
|
|
|||
| {{< include _sec-surv-R.qmd >}} | |||
|
|
|||
| ## R Packages for Survival Analysis | |||
|
|
|||
| {{< include _sec-surv-r-packages-overview.qmd >}} | |||
|
|
|||
There was a problem hiding this comment.
should these two sections be combined?
There was a problem hiding this comment.
Combined in commit 2e5831b. The packages overview is now integrated as a subsection of "Using the survival package in R" after the plotting examples, creating a more cohesive flow from basic usage to the broader ecosystem.
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
d-morrison
left a comment
There was a problem hiding this comment.
move the new content into a sub file
Co-authored-by: d-morrison <2474437+d-morrison@users.noreply.github.com>
Done in commit bec50a0. Moved the R packages ecosystem content into |
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.