pr_table | R Documentation |
A single-stage function for calculating the probabilities of crit
or fewer (greater if greater = TRUE
) events for true but unknown
prob
abilities of the event occurring.
pr_table(prob, n, crit, greater = FALSE, digits = getOption("digits"))
prob |
a vector of probabilities for event |
n , crit |
sample size and critical number of events, respectively; note
that the probabilities will always be calculated as weakly less or greater
than |
greater |
|
digits |
number of digits past the decimal point to keep |
blt_table
; dlt_table
prob <- c(1, 5, 1:5 * 10) / 100
## probabilities of crit or fewer events given true but unknown prob
pr_table(prob, n = 15, crit = 3, greater = FALSE)
## probabilities of crit or more events given true but unknown prob
pr_table(prob, n = 15, crit = 3, greater = TRUE)
## compare
1 - as.numeric(pr_table(prob, n = 15, crit = 2, greater = FALSE)[2L, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.