Learn R Programming

vlad (version 0.1.0)

cusum_arl_h_sim: Compute alarm threshold of the Bernoulli CUSUM control charts using simulation

Description

Compute alarm threshold of the Bernoulli CUSUM control charts using simulation.

Usage

cusum_arl_h_sim(L0, df, R0 = 1, RA = 2, m = 100, nc = 1,
  verbose = FALSE)

Arguments

L0

double. Prespecified in-control Average Run Length.

df

DataFrame. First column are Parsonnet Score values within a range of zero 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.

m

integer. Number of simulation runs.

nc

integer. Number of cores.

verbose

boolean. 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 cusum_arl_h_sim determines the control limit for given in-control ARL (L0) by applying a multi-stage search procedure which includes secant rule and the parallel version of cusum_arl_sim using mclapply.