View source: R/power_events_rate.R
| power_events_rate | R Documentation |
Computes the exact binomial probability of observing at least e
events, for every combination of sample size and risk, and for one or more
event thresholds.
power_events_rate(n, r, e)
n |
Integer or vector of integers. Sample size(s). |
r |
Numeric or vector of numerics. Risk(s) (per-subject event probability), between 0 and 1. |
e |
Integer or vector of integers. Event count threshold(s), e.g. 1, 2, 3. |
A matrix of class power_events_rate with columns:
Sample size
Per-subject event probability
One column per threshold in e, named using the
"greater than or equal to" symbol followed by the threshold value,
giving P(X >= e) for X ~ Binomial(N, Risk)
power_events_rate(30, 0.1, 1:3)
power_events_rate(c(30, 60), c(0.05, 0.1), c(1, 2, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.