Description Usage Arguments Examples
Computes arbitrary bootstrap statistics on univariate data.
1 2 3 |
data |
A data frame. |
column |
A column of |
summary_function |
A function to be computed over each set of samples as
a data frame, or a function to be computed over each set of samples as a
single column of a data frame indicated by |
statistics_functions |
A function to be computed over each set of
samples as a data frame, or a named list of functions to be computed over
each set of samples as a single column of a data frame indicated by
|
nboot |
The number of bootstrap samples to take (defaults to
|
... |
Other arguments passed from generic. |
1 2 3 4 5 6 7 8 9 | ## Mean and 95% confidence interval for 500 samples from two different normal distributions
require(dplyr)
gauss1 <- data_frame(value = rnorm(500, mean = 0, sd = 1), condition = 1)
gauss2 <- data_frame(value = rnorm(500, mean = 2, sd = 3), condition = 2)
df <- bind_rows(gauss1, gauss2)
df %>% group_by(condition) %>%
tidyboot(summary_function = function(x) x %>% summarise(mean = mean(value)),
statistics_functions = function(x) x %>%
summarise_at(vars(mean), funs(ci_upper, mean, ci_lower)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.