Description Usage Arguments Value Author(s) References Examples
Compute the ARL of risk-adjusted CUSUM charts assuming a beta distributed patient mix.
1 2 3 4 5 | racusum_beta_arl_mc(h, shape1, shape2, g0, g1, RA, RQ = 1, r = 600, method = 1)
racusum_beta_arl_int(h, shape1, shape2, g0, g1, RA, RQ, N, pw)
racusum_beta_arl_sim(h, shape1, shape2, g0, g1, r, RA = 2, RQ = 1, rs = 71)
|
h |
Double. |
shape1 |
Double. Shape parameter alpha |
shape2 |
Double. Shape parameter beta |
g0 |
Double. Estimated intercept coefficient from a binary logistic regression model. |
g1 |
Double. Estimated slope coefficient from a binary logistic regression model. |
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. |
r |
Integer. Number of runs. |
method |
Character. If |
N |
Integer. Number of quadrature nodes, dimension of the resulting linear equation system
is equal to |
pw |
Logical. If |
rs |
Integer. Maximum risk score. |
Returns a single value which is the Average Run Length for "racusum_beta_arl_mc"
and "racusum_beta_arl_int"
, and the Run Length for "racusum_beta_arl_sim"
.
Philipp Wittenberg
Brook D and Evans DA (1972) An approach to the probability distribution of CUSUM run length. Biometrika, 59(3), pp. 539–549
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
library(vlad)
## Markov Chain
racusum_beta_arl_mc(h=4.5, shape1=1, shape2=6, g0=-3.6798, g1=0.0768*71, RA=2, r=1e4)
## Full collocation
racusum_beta_arl_int(h=4.5, shape1=1, shape2=6, g0=-3.6798, g1=0.0768*71, RA=2, RQ=1, N=150,
pw=FALSE)
## Piece-wise collocation
racusum_beta_arl_int(h=4.5, shape1=1, shape2=6, g0=-3.6798, g1=0.0768*71, RA=2, RQ=1, N=49,
pw=TRUE)
## Monte Carlo simulation
m <- 1e3
RLS <- sapply(1:m, racusum_beta_arl_sim, h=4.5, shape1=1, shape2=6, g0=-3.6798, g1=0.0768,
RA = 2, RQ = 1, rs = 71)
data.frame(cbind(ARL=mean(RLS), ARLSE=sd(RLS)/sqrt(m)))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.