powered by
Calculates sample size or power for self-controlled case series studies.
sccs_size(p, r, alpha, beta = NULL, n = NULL)
Numeric. Returns sample size (if beta is given), or power (if n is given).
beta
n
Numeric. True relative incidence (risk period vs baseline).
Numeric. Proportion of observation time that is risk period.
Numeric. Type I error rate.
Numeric (optional). Type II error rate. Required for sample size calculation.
Integer (optional). Sample size. Required for power calculation.
# Sample size sccs_size(p = 3, r = 42/365, alpha = 0.05, beta = 0.2) # Power sccs_size(p = 3, r = 42/365, alpha = 0.05, n = 54)
Run the code above in your browser using DataLab