Description Usage Arguments Value Examples
View source: R/cusum_alpha_sim.R
Simulate false signal probability alpha given control limit for CUSUM charts
1 2 | cusum_alpha_sim(failure_probability, n_patients, odds_multiplier,
n_simulation, limit, 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 |
limit |
Double. Control limit for signalling performance change |
seed |
Integer. Seed for RNG |
Returns False signal probability of specified CUSUM chart.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #
# control limit can be obtained with cusum_limit_sim(),
# here it is set to an arbitrary value (2.96)
# simulate false positive probability of CUSUM
cusum_alpha_sim(
failure_probability = 0.05,
n_patients = 100,
odds_multiplier = 2,
n_simulation = 10000,
limit = 2.96,
seed = 2046
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.