prec_rateratio | R Documentation |
prec_rateratio
returns the sample size or the precision for the
provided proportions.
prec_rateratio(
n1 = NULL,
rate1 = NULL,
rate2 = 2 * rate1,
prec.level = NULL,
r = 1,
conf.level = 0.95
)
n1 |
number of patients in exposed group. |
rate1 |
event rate in the exposed group. |
rate2 |
event rate in the unexposed group. |
prec.level |
ratio of the upper limit over the lower limit of the rate ratio confidence interval. |
r |
allocation ratio (relative size of unexposed and exposed cohort
( |
conf.level |
confidence level. |
Exactly one of the parameters n1
or conf.width
must be passed as
NULL, and that parameter is determined from the other. Event rates in the two
groups should also be provided (rate1, rate2
). If only
rate1
is provided, rate2
is assumed to be 2 times
rate1
.
Rothman KJ, Greenland S (2018). Planning Study Size Based on Precision Rather Than Power. Epidemiology, 29:599-603. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1097/EDE.0000000000000876")}.
# 20 participants, a rate of 50% against a rate of 300\%
prec_rateratio(20, .5, 3)
# sample size required to attain a CI whose upper limit is not more than 3.81 larger
# than the lower limit
prec_rateratio(rate1 = .5, rate2 = 3, prec.level = 3.81)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.