Learn R Programming

⚠️There's a newer version (0.5.1) of this package.Take me there.

Description

An implementation of popular evaluation metrics that are commonly used in survival prediction including Concordance Index, Brier Score, Integrated Brier Score, Integrated Square Error, Integrated Absolute Error and Mean Absolute Error. For a detailed information, see (Ishwaran H, Kogalur UB, Blackstone EH and Lauer MS (2008) doi:10.1214/08-AOAS169) and (Moradian H, Larocque D and Bellavance F (2017) doi:10.1007/s10985-016-9372-1) for different evaluation metrics.

Installation

You can install the released version of SurvMetrics from CRAN with:

install.packages("SurvMetrics")

or Install devtools and build the development version by:

install.packages("devtools", repos = "https://cloud.r-project.org/")
devtools::install_github("skyee1/SurvMetrics")

Example

This is a basic example which shows you how to solve a common problem:

library(SurvMetrics)
library(survival)
time = c(1, 1, 2, 2, 2, 2, 2, 2)
status = c(0, 1, 1, 0, 1, 1, 0, 1)
predicted = c(2, 3, 3, 3, 4, 2, 4, 3)
Cindex(Surv(time, status), predicted)

Citation

If you use SurvMetrics in your research and we would greatly appreciate if you could use the following:

@Manual{,
    title = {SurvMetrics: Predictive Evaluation Metrics in Survival Analysis},
    author = {Hanpu Zhou and Xuewei Cheng and Sizheng Wang and Yi Zou and Hong Wang},
    year = {2022},
    note = {R package version 0.5.0},
    url = {https://github.com/skyee1/SurvMetrics},
  }

Copy Link

Version

Install

install.packages('SurvMetrics')

Monthly Downloads

1,109

Version

0.5.0

License

GPL (>= 2)

Issues

Pull Requests

Stars

Forks

Maintainer

Hanpu Zhou

Last Published

September 3rd, 2022

Functions in SurvMetrics (0.5.0)

SDGM4

Survival Data Generation Method 4
SDGM1

Survival Data Generation Method 1
MAE

The Mean Absolute Error
predictSurvProb2survreg

Predicting Survival Probabilities for a 'survreg' Object
SDGM3

Survival Data Generation Method 3
IAEISE

The Integrate Absolute Error and The Integrate Square Error
Gt

The Kaplan-Meier Estimate of the Censoring Distribution
SDGM2

Survival Data Generation Method 2
CindexCR

Concordance index in the Presence of Competing Risks
Brier

The Brier Score
Cindex

The Concordance Index for Right-Censored Survival Time Data
IBS

The Integration of the Brier Score