Learn R Programming

success

SUrvival Control Chart EStimation Software

The goal of the package is to allow easy applications of continuous time CUSUM procedures on survival data. Specifically, the Biswas & Kalbfleisch CUSUM (2008) and the CGR-CUSUM (Gomon et al. 2022).

Besides continuous time procedures, it is also possible to construct the Bernoulli (binary) CUSUM and funnel plot (Spiegelhalter 2005) on survival data.

Installation

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

install.packages("success")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("d-gomon/success")

CGR-CUSUM Example

This is a basic example which shows you how to construct a CGR-CUSUM chart on a hospital from the attached data set “surgerydat”:

dat <- subset(surgerydat, unit == 1)
exprfit <- as.formula("Surv(survtime, censorid) ~ age + sex + BMI")
tcoxmod <- coxph(exprfit, data = surgerydat)

cgr <- cgr_cusum(data = dat, coxphmod = tcoxmod, stoptime = 200)
plot(cgr)

You can plot the figure with control limit h = 10 by using:

plot(cgr, h = 10)

And determine the runlength of the chart when using control limit h = 10:

runlength(cgr, h = 10)
#> [1] 151

Using a control limit of h = 10 Hospital 1 would be detected by a CGR-CUSUM 151 days after the first patient entered the study.

References

Gomon D., Putter H., Nelissen R.G.H.H., van der Pas S (2022): CGR-CUSUM: A Continuous time Generalized Rapid Response Cumulative Sum chart, Biostatistics

Biswas P. and Kalbfleisch J.D. (2008): A risk-adjusted CUSUM in continuous time based on the Cox model, Statistics in Medicine

Spiegelhalter D.J. (2005): Funnel plots for comparing institutional performance, Statistics in Medicine

Copy Link

Version

Install

install.packages('success')

Monthly Downloads

525

Version

1.0.1

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Daniel Gomon

Last Published

October 9th, 2023

Functions in success (1.0.1)

bk_control_limit

Determine control limits for BK-CUSUM by simulation
bk_cusum

Continuous time BK-CUSUM
calc_Wncdf

Calculate cdf of singletons W_n for CUSUM
calc_risk

Calculate the Cox Proportional hazards relative risk associated with the covariates of subjects
bernoulli_ARL_MC

Average run length for Bernoulli CUSUM using Markov Chain methodology
bernoulli_ARL_SPRT

Average run length for Bernoulli CUSUM using Integral Equation methodology
breast

Survival after breast cancer surgery
interactive_plot

Plot a list of CUSUM charts (interactive)
cgr_cusum

Continuous time Generalized Rapid response CUSUM (CGR-CUSUM)
parameter_assist

Assist users in parameter selection
cgr_control_limit

Determine control limits for CGR-CUSUM by simulation
calc_MC_trans_matrix

Transition probability matrix for Bernoulli CUSUM
exp_hazards

Exponential hazard, cumulative hazard and inverse cumulative hazard
weib_hazards

Weibull hazard, cumulative hazard and inverse cumulative hazard
extract_hazard

Extract (inverse) cumulative baseline hazard from Cox PH model
runlength

Determine run length of a CUSUM chart
surgerydat

Simulated data set with data of surgery procedures performed at multiple hospitals.
summary.funnelplot

Summarizes S3 objects in this package.
plot.cgrcusum

Plot a quality control chart
funnel_plot

Risk-adjusted funnel plot
gen_arriv_times

Generate arrival times according to a Poisson point process
generate_units

Generate units with specified failure rate
gen_surv_times

Generate survival times
bernoulli_control_limit

Determine control limits for the Bernoulli CUSUM by simulation
bernoulli_RL_cdf

Cumulative distribution function (cdf) of Run Length for Bernoulli CUSUM
bernoulli_cusum

Risk-adjusted Bernoulli CUSUM
bernoulli_cdf_MC

Average run length for Bernoulli CUSUM using Markov Chain methodology
arrival_rate

Estimate arrival rate of a Poisson points process
bernoulli_ARL

Average Run Length for Bernoulli CUSUM