cusum_limit_exact {cusum}R Documentation

Calculate exact control limit given false signal probability alpha for CUSUM charts for very small sample sizes

Description

This function only works for very small sample sizes (<= 15), as it permutes through all possible outcome sequences and estimates the percentage of runs that reach a specific CUSUM values.

Usage

cusum_limit_exact(n_patients, failure_probability, odds_multiplier, alpha)

Arguments

n_patients

Integer. Number of patients in monitoring period /sample size

failure_probability

Double. Baseline failure probability

odds_multiplier

Double. Odds multiplier of adverse event under the alternative hypothesis (<1 looks for decreases)

alpha

Double. False signal probability of CUSUM

Value

Returns the control limit for signalling performance change for small sample sizes (double)

Examples


# calculate exact control limits for alpha = 0.05
cusum_limit_exact(
  failure_probability = 0.1,
  n_patients = 10,
  odds_multiplier = 2,
  alpha = 0.05
)

[Package cusum version 0.4.1 Index]