Description Usage Arguments Details Value Author(s) References Examples
Compute alarm threshold of EO-CUSUM control charts using simulation.
1 2 | eocusum_crit_sim(L0, pmix, k, RQ = 1, side = "low", yemp = FALSE,
m = 10000, nc = 1, hmax = 30, jmax = 4, verbose = FALSE)
|
L0 |
Double. Prespecified in-control Average Run Length. |
pmix |
Data Frame. A three column data frame. First column is the operation outcome. Second column are the predicted probabilities from the risk model. Third column can be either the predicted probabilities from the risk model or average outcome. |
k |
Double. Reference value of the CUSUM control chart. Either |
RQ |
Double. Defines the true performance of a surgeon with the odds ratio ratio of death
|
side |
Character. Default is |
yemp |
Logical. If |
m |
Integer. Number of simulation runs. |
nc |
Integer. Number of cores used for parallel processing. Value is passed to
|
hmax |
Integer. Maximum value of |
jmax |
Integer. Number of digits for grid search. |
verbose |
Logical. If |
Determines the control limit ("h
") for given in-control ARL ("L0"
)
applying a grid search using eocusum_arl_sim
and parSapply
.
Returns a single value which is the control limit h
for a given in-control ARL.
Philipp Wittenberg
Barnard GA (1959). Control charts and stochastic processes. J R Stat Soc Series B Stat Methodol, 21(2), pp. 239–271.
Kemp KW (1961). The Average Run Length of the Cumulative Sum Chart when a V-mask is used. J R Stat Soc Series B Stat Methodol, 23(1),pp. 149–153.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Not run:
library(vlad)
library(dplyr)
data("cardiacsurgery", package = "spcadjust")
## preprocess data to 30 day mortality
SALL <- cardiacsurgery %>% rename(s = Parsonnet) %>%
mutate(y = ifelse(status == 1 & time <= 30, 1, 0),
phase = factor(ifelse(date < 2*365, "I", "II")))
SI <- subset(SALL, phase == "I")
y <- subset(SALL, select = y)
GLM <- glm(y ~ s, data = SI, family = "binomial")
pi1 <- predict(GLM, type = "response", newdata = data.frame(s = SALL$s))
pmix <- data.frame(y, pi1, pi1)
## (Deterioration)
kopt <- optimal_k(pmix = pmix, RA = 2)
h <- eocusum_crit_sim(L0=370, pmix=pmix, k=kopt, side = "low", verbose=TRUE, nc=4)
## parameters to set up a tabular CUSUM or V-Mask (upper arm)
d <- h/kopt
theta <- atan(kopt)*180/pi
cbind(kopt, h, theta, d)
## (Improvement)
kopt <- optimal_k(pmix = pmix, RA = 1/2)
h <- eocusum_crit_sim(L0=370, pmix=pmix, k=kopt, side = "up", verbose=TRUE, nc=4)
## parameters to set up a tabular CUSUM or V-Mask (lower arm)
d <- h/kopt
theta <- atan(kopt)*180/pi
cbind(kopt, h, theta, d)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.