surtvep

surtvep: An R package for estimating time-varying effects - Published in JOSS (2024)

https://github.com/um-kevinhe/surtvep

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 11 DOI reference(s) in README and JOSS metadata
  • Academic publication links
  • Committers with academic emails
    2 of 4 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Scientific Fields

Earth and Environmental Sciences Physical Sciences - 40% confidence
Engineering Computer Science - 40% confidence
Artificial Intelligence and Machine Learning Computer Science - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

Basic Info
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 4
  • Open Issues: 0
  • Releases: 3
Created over 3 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog Contributing License

README.md

surtvep

surtvep is an R package for fitting Cox non-proportional hazards models with time-varying coefficients. Both unpenalized procedures (Newton and proximal Newton) and penalized procedures (P-splines and smoothing splines) are included using B-spline basis functions for estimating time-varying coefficients. For penalized procedures, cross validations, mAIC, TIC or GIC are implemented to select tuning parameters. Utilities for carrying out post-estimation visualization, summarization, point-wise confidence interval and hypothesis testing are also provided.

Introduction

Large-scale time-to-event data derived from national disease registries arise rapidly in medical studies. Detecting and accounting for time-varying effects is particularly important, as time-varying effects have already been reported in the clinical literature. However, there are currently no formal R packages for estimating the time-varying effects without pre-assuming the time-dependent function. Inaccurate pre-assumptions can greatly influence the estimation, leading to unreliable results. To address this issue, we developed a time-varying model using spline terms with penalization that does not require pre-assumption of the true time-dependent function, and implemented it in R.

Our package offers several benefits over traditional methods. Firstly, traditional methods for modeling time-varying survival models often rely on expanding the original data into a repeated measurement format. However, even with moderate sample sizes, this leads to a large and computationally burdensome working dataset. Our package addresses this issue by proposing a computationally efficient Kronecker product-based proximal algorithm, which allows for the evaluation of time-varying effects in large-scale studies. Additionally, our package allows for parallel computing and can handle moderate to large sample sizes more efficiently than current methods.

In our statistical software tutorial, we address a common issue encountered when analyzing data with binary covariates with near-zero variation. For example, in the SEER prostate cancer data, only 0.6% of the 716,553 patients had their tumors regional to the lymph nodes. In such cases, the associated observed information matrix of a Newton-type method may have a minimum eigenvalue close to zero and a large condition number. Inverting this nearly singular matrix can lead to numerical instability and the corresponding Newton updates may be confined within a small neighborhood of the initial value, resulting in estimates that are far from the optimal solutions. To address this problem, our proposed Proximal-Newtown method utilizes a modified Hessian matrix, which allows for accurate estimation in these scenarios.

Installation

Note: This package is still in its early stages of development, so please don't hesitate to report any problems you may experience.

The package only works for R 4.1.0+.

You can install 'surtvep' via CRAN or github:

install.packages("surtvep")

#or
require("devtools")
require("remotes")
remotes::install_github("UM-KevinHe/surtvep")

We recommand to start with tutorial, as it provides an overview of the package's usage, including preprocessing, model training, selection of penalization parameters, and post-estimation procedures.

Detailed tutorial

For detailed tutorial and model paramter explaination, please go to here.

Getting Help

If you encounter any problems or bugs, please contact us at: lfluo@umich.edu, kevinhe@umich.edu, Wenbo.Wu@nyulangone.org

Contributing

We welcome contributions to the surtvep package. Please see our CONTRIBUTING.md file for detailed guidelines of how to contribute.

References

[1] Gray, R. J. (1992). Flexible methods for analyzing survival data using splines, with applications to breast cancer prognosis. Journal of the American Statistical Association, 87(420), 942–951. https://doi.org/10.2307/2290630

[2] Gray, R. J. (1994). Spline-based tests in survival analysis. Biometrics, 50(3), 640–652. https://doi.org/10.2307/2532779

[3] He, K., Zhu, J., Kang, J., & Li, Y. (2022). Stratified Cox models with time-varying effects for national kidney transplant patients: A new blockwise steepest ascent method. Biometrics, 78(3), 1221–1232. https://doi.org/10.1111/biom.13473

[4] Luo, L., He, K., Wu, W., & Taylor, J. M. (2023). Using information criteria to select smoothing parameters when analyzing survival data with time-varying coefficient hazard models. Statistical Methods in Medical Research, in press. https://doi.org/10.1177/09622802231181471

[5] Wu, W., Taylor, J. M., Brouwer, A. F., Luo, L., Kang, J., Jiang, H., & He, K. (2022). Scalable proximal methods for cause-specific hazard modeling with time-varying coefficients. Lifetime Data Analysis, 28 (2), 194–218. https://doi.org/10.1007/s10985-021-09544-2

Owner

  • Name: UM-KevinHe
  • Login: UM-KevinHe
  • Kind: organization

JOSS Publication

surtvep: An R package for estimating time-varying effects
Published
June 28, 2024
Volume 9, Issue 98, Page 5688
Authors
Lingfeng Luo
Department of Biostatistics, School of Public Health, University of Michigan
Wenbo Wu
Departments of Population Health and Medicine, New York University Grossman School of Medicine
Jeremy M.g. Taylor
Department of Biostatistics, School of Public Health, University of Michigan
Jian Kang
Department of Biostatistics, School of Public Health, University of Michigan
Michael J. Kleinsasser
Department of Biostatistics, School of Public Health, University of Michigan
Kevin He
Department of Biostatistics, School of Public Health, University of Michigan
Editor
Øystein Sørensen ORCID
Tags
survival time-varying effects penalization

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 180
  • Total Committers: 4
  • Avg Commits per committer: 45.0
  • Development Distribution Score (DDS): 0.328
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
LingfengLuo0510 l****o@u****u 121
xuetao666 9****6 54
Lingfeng Luo l****o@L****l 3
Michael Kleinsasser m****a@u****u 2
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 0
  • Total pull requests: 10
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • LingfengLuo0510 (13)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 167 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
cran.r-project.org: surtvep

Cox Non-Proportional Hazards Model with Time-Varying Coefficients

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 167 Last month
Rankings
Forks count: 14.4%
Dependent packages count: 29.0%
Stargazers count: 34.7%
Dependent repos count: 36.9%
Average: 40.4%
Downloads: 86.7%
Maintainers (1)
Last synced: 4 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.5 depends
  • ggplot2 * depends
  • splines2 * depends
  • Rcpp * imports
  • ggplot2 * imports
  • ggrepel * imports
  • mvtnorm * imports
  • splines * imports
  • splines2 * imports
  • survival * imports
  • knitr * suggests
  • rmarkdown * suggests