knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of survextras is to provide helper functions for survival analysis.
You can install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("alberto-mateos-mo/survextras")
The package contains 3 main functions:
intro_surv()
max_diff_time()
parametric_diagnose()
intro_surv()
function will give you an introductory plot of your survival data:
library(survextras) library(survival) intro_surv(df = cancer, times = "time", event = "status", interactive = FALSE)
max_diff_time()
function finds and plots maximun difference time fitted survival curves.
library(survextras) library(survival) library(survminer) fit <- surv_fit(Surv(time, status)~sex, data = cancer) max_diff_time(fit)
parametric_diagnose()
function creates assesment plot to diagnose if KM estimator could potentially follow a known distribution.
library(survextras) library(survival) library(survminer) kmfit <- surv_fit(Surv(time, status)~1, data = cancer) parametric_diagnose(kmfit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.