Learn R Programming

vlad (version 0.2.0)

racusum_crit_sim: Compute alarm threshold of RA-CUSUM control charts using simulation

Description

Compute alarm threshold of risk-adjusted cumulative sum control charts using simulation.

Usage

racusum_crit_sim(L0, df, coeff, R0 = 1, RA = 2, m = 100,
  yemp = TRUE, nc = 1, jmax = 4, verbose = FALSE)

Arguments

L0

Double. Prespecified in-control Average Run Length.

df

Data Frame. First column are Parsonnet Score values within a range of 0 to 100 representing the preoperative patient risk. The second column are binary (0/1) outcome values of each operation.

coeff

Numeric Vector. Estimated coefficients \(\alpha\) and \(\beta\) from the binary logistic regression model.

R0

Double. Odds ratio of death under the null hypotheses.

RA

Double. Odds ratio of death under the alternative hypotheses. Detecting deterioration in performance with increased mortality risk by doubling the odds Ratio RA = 2. Detecting improvement in performance with decreased mortality risk by halving the odds ratio of death RA = 1/2.

m

Integer. Number of simulation runs.

yemp

Logical. If TRUE, use emirical outcome values, else use model.

nc

Integer. Number of cores used for parallel processing.

jmax

Integer. Number of digits for grid search.

verbose

Logical. If TRUE verbose output is included, if FALSE a quiet calculation of h is done.

Value

Returns a single value which is the control limit h for a given in-control ARL.

Details

The function racusum_crit_sim determines the control limit h for given in-control ARL (L0) by applying a multi-stage search procedure which includes secant rule and the parallel version of racusum_arl_sim using mclapply.

References

Steiner SH, Cook RJ, Farewell VT and Treasure T (2000). Monitoring surgical performance using risk-adjusted cumulative sum charts. Biostatistics, 1(4), pp. 441--452.

Wittenberg P, Gan FF, Knoth S (2018). A simple signaling rule for variable life-adjusted display derived from an equivalent risk-adjusted CUSUM chart. Statistics in Medicine, 37(16), pp 2455--2473.

Examples

Run this code
# NOT RUN {
library(vlad)
library("dplyr")
data("cardiacsurgery", package = "spcadjust")

## preprocess data to 30 day mortality and subset phase I (In-control) of surgeons 2
S2I <- cardiacsurgery %>% rename(s = Parsonnet) %>%
  mutate(y = ifelse(status == 1 & time <= 30, 1, 0),
         phase = factor(ifelse(date < 2*365, "I", "II"))) %>%
  filter(phase == "I", surgeon == 2) %>% select(s, y)

## estimate coefficients from logit model
coeff1 <- round(coef(glm(y ~ s, data = S2I, family = "binomial")), 3)

## control limit for detecting deterioration RA = 2:
racusum_crit_sim(L0 = 740, df = S2I, coeff = coeff1, m = 10^3, nc = 4)
# }

Run the code above in your browser using DataLab