racusum_adoc_sim {vlad} | R Documentation |
Compute steady-state ARLs of risk-adjusted cumulative sum control charts using simulation.
racusum_adoc_sim(r, coeff, coeff2, h, df, R0 = 1, RA = 2, RQ = 1, m = 50, type = "cond")
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 |
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 |
RQ |
Double. Defines the performance of a surgeon with the odds ratio ratio of death |
m |
Integer. Simulated in-control observations. |
type |
Character. Default argument is |
Returns a single value which is the Run Length.
Philipp Wittenberg
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: 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.
## 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() ## End(Not run)