Description Usage Arguments Value Examples
View source: R/cusum_limit_sim.R
Simulate control limit given false signal probability alpha for CUSUM charts
1 2 | cusum_limit_sim(failure_probability, n_patients, odds_multiplier,
n_simulation, alpha, seed = NULL)
|
failure_probability |
Double. Baseline failure probability |
n_patients |
Integer. Number of patients in monitoring period /sample size |
odds_multiplier |
Double. Odds multiplier of adverse event under the alternative hypothesis (<1 looks for decreases) |
n_simulation |
Integer. Number of simulation runs |
alpha |
Double. False signal probability of CUSUM |
seed |
Integer. Seed for RNG |
Returns the control limit for signalling performance change (double)
1 2 3 4 5 6 7 8 9 | # simulate control limits for alpha = 0.05
cusum_limit_sim(
failure_probability = 0.05,
n_patients = 100,
odds_multiplier = 2,
n_simulation = 1000,
alpha = 0.05,
seed = 2046
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.