View source: R/stats_extensions.R
beta_interval | R Documentation |
Apply a confidence interval to values in a dataframe based on the beta distribution.
beta_interval(.data, alpha, beta, conf = 0.95)
.data |
Data frame; a confidence interval will be applied to each row in the data frame. |
alpha |
First shape parameter of the beta distribution, must be greater than 0 |
beta |
Second shape parameter of the beta distribution, must be greater than 0 |
conf |
Confidence interval, must be between |
Other interval verbs:
normal_interval()
# create example df
alpha <- rnorm(10, 100, 20)
beta <- rnorm(10, 80, 10)
example <- dplyr::bind_cols(alpha, beta)
colnames(example) <- c("alpha", "beta")
# apply the default confidence interval of 0.95
beta_interval(example, alpha, beta)
# apply a custom confidence interval
beta_interval(example, alpha, beta, conf = 0.99)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.