coxed: An R Package for Computing Duration-Based Quantities from the Cox Proportional Hazards Model

The Cox proportional hazards model is one of the most frequently used estimators in duration (survival) analysis. Because it is estimated using only the observed durations’ rank ordering, typical quantities of interest used to communicate results of the Cox model come from the hazard function (e.g., hazard ratios or percentage changes in the hazard rate). These quantities are substantively vague and difficult for many audiences of research to understand. We introduce a suite of methods in the R package coxed to address these problems. The package allows researchers to calculate duration-based quantities from Cox model results, such as the expected duration (or survival time) given covariate values and marginal changes in duration for a specified change in a covariate. These duration-based quantities often match better with researchers’ substantive interests and are easily understood by most readers. We describe the methods and illustrate use of the package.

Jonathan Kropko , Jeffrey J. Harden
2019-12-26

Supplementary materials

Supplementary materials are available in addition to this article. It can be downloaded at RJ-2019-042.zip

CRAN packages used

coxed

CRAN Task Views implied by cited packages

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Kropko & Harden, "coxed: An R Package for Computing Duration-Based Quantities from the Cox Proportional Hazards Model", The R Journal, 2019

BibTeX citation

@article{RJ-2019-042,
  author = {Kropko, Jonathan and Harden, Jeffrey J.},
  title = {coxed: An R Package for Computing Duration-Based Quantities from the Cox Proportional Hazards Model},
  journal = {The R Journal},
  year = {2019},
  note = {https://doi.org/10.32614/RJ-2019-042},
  doi = {10.32614/RJ-2019-042},
  volume = {11},
  issue = {2},
  issn = {2073-4859},
  pages = {38-45}
}