cusumr: Cumulative sum analysis on binary dataset.

Description Usage Arguments References Examples

View source: R/cusumr.R

Description

The cusumr command takes in a binary vector of data and returns a dataframe of rolling cusum scores per event. The dataframe is indicative of compliance with the dataset. Users can choose to include a learning phase and reset options based on default values for upper and lower decision limits as well as acceptable rates of success and error.

For plotting see the cusumr_plot command.

Usage

1
2
3
4
5
6
7
8
9
cusumr(
  events_outcomes,
  acceptable_rate = 0.2,
  unacceptable_rate = 0.4,
  type1_error_rate = 0.1,
  type2_error_rate = 0.1,
  learning = TRUE,
  reset = TRUE
)

Arguments

events_outcomes

vector = [n_samples of 0s and 1s]. Binary Integer values. If intergers are not 0 or 1, then the FALSE alarms should be explicitly given.

acceptable_rate

numeric, default=0.2. Number between 0 and 1. Acceptable success rate of the process being monitored.

unacceptable_rate

numeric, default=0.24 Number between 0 and 1.

type1_error_rate

numeric, default=0.1. Number between 0 and 1. A false positive or type 1 error rate

type2_error_rate

numeric, default=0.2 Number between 0 and 1. A false negative or type 2 error rate

learning

boolean, optional (default=True). Whether to start from learning phase or from monitoring phase.

reset

boolean, optional (default=True). Whether to reset score when the score hits the decision limit in monitoring phase. If yes, the cusum score will start at zero again and restart monitoring.

References

The use of the Cusum technique in the assessment of trainee competence in new procedures. Int J Qual Health Care. 2000 Oct;12(5):433-8.

https://www.ncbi.nlm.nih.gov/pubmed/11079224

Cumulative sum (CUSUM) assessment and medical education: a square peg in a round hole. Anaesthesia, 2011, 66, pages 243-254.

https://onlinelibrary.wiley.com/doi/pdf/10.1111/j.1365-2044.2011.06692.x

An application of the learning curve cumulative summation test to evaluate training for endotracheal intubation in emergency medicine. Emerg Med J, 2015;32:291?..294.

https://www.ncbi.nlm.nih.gov/pubmed/24154942

Examples

1
2
3
df <- c(0,0,0,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
cusumr(df)
cusumr(events_outcomes = df, learning = FALSE, reset = TRUE)

rsh52/cusumr documentation built on May 11, 2021, 1:38 a.m.