Learn R Programming

vlad (version 0.2.0)

racusum_adoc_sim: Compute steady-state ARLs of RA-CUSUM control charts using simulation

Description

Compute steady-state ARLs of risk-adjusted cumulative sum control charts using simulation.

Usage

racusum_adoc_sim(r, coeff, coeff2, h, df, R0 = 1, RA = 2, RQ = 1,
  m = 50, type = "cond")

Arguments

r

Integer Vector. Number of runs.

coeff

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

coeff2

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

h

Double. Control Chart limit for detecting deterioration/improvement.

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.

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.

RQ

Double. Defines the performance of a surgeon with the odds ratio ratio of death Q.

m

Integer. Simulated in-control observations.

type

Character. Default argument is "cond" for computation of conditional steady-state. Other option is the cyclical steady-state "cycl".

Value

Returns a single value which is the Run Length.

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. doi: 10.1093/biostatistics/1.4.441.

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.

Taylor HM (1968). The Economic Design of Cumulative Sum Control Charts. Technometrics, 10(3), pp. 479--488.

Crosier R (1986). A new two-sided cumulative quality control scheme. Technometrics, 28(3), pp. 187--194.

Examples

Run this code
# NOT RUN {
library(vlad)
data("cardiacsurgery", package="spcadjust")
# build data set
df1 <- subset(cardiacsurgery, select=c(Parsonnet, status))

# estimate coefficients from logit model
coeff1 <- round(coef(glm(status ~ Parsonnet, data=df1, family="binomial")), 3)

# simulation of conditional steady state
m <- 10^3
tau <- 50
res <- sapply(0:(tau-1), function(i){
 RLS <- do.call(c, parallel::mclapply( 1:m, racusum_adoc_sim, RQ=2, h=2.0353, df=df1, m=i,
                                       coeff=coeff1, coeff2=coeff1,
                                       mc.cores=parallel::detectCores()) )
 list(data.frame(cbind(ARL=mean(RLS), ARLSE=sd(RLS)/sqrt(m))))
} )

# plot
RES <- data.frame(cbind(M=0:(tau-1), do.call(rbind, res)))
ggplot2::qplot(x=M, y=ARL, data=RES, geom=c("line", "point")) +
ggplot2::theme_classic()
# }

Run the code above in your browser using DataLab