racusum_limit_sim {cusum} | R Documentation |
Simulate control limit given false signal probability alpha for RA-CUSUM charts
Description
False-signal-probability-simulation of Control Limits h for risk-adjusted CUSUM charts
Usage
racusum_limit_sim(patient_risks, odds_multiplier, n_simulation, alpha,
seed = NULL)
Arguments
patient_risks |
Double. Vector of patient risk scores (individual risk of adverse event) |
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 RA-CUSUM |
seed |
Integer. Seed for RNG |
Value
Returns the control limit for signalling performance change (double)
Examples
# Patients risks are usually known from Phase I.
# If not, these risk scores can be simulated.
# define possible patient risk scores
risks <- c(0.001, 0.01, 0.1, 0.002, 0.02, 0.2)
# sample risk population of size n = 100
set.seed(2046)
patient_risks <- sample(x = risks, size = 100, replace = TRUE)
# simulate control limits for alpha = 0.05
racusum_limit_sim(patient_risks,
odds_multiplier = 2,
n_simulation = 1000,
alpha = 0.05,
seed = 2046
)
[Package cusum version 0.4.1 Index]