bootstrapped_summary: Bootstrapped mean and confidence interval

Description Usage Arguments Value Examples

Description

The function returns the mean and the confidence interval for a numeric vector

Usage

1
bootstrapped_summary(data, repeats = 1000)

Arguments

data

A numeric vector containing the values to be summarized

repeats

An integer indicating the number of bootstrap samples to be used

Value

A data.frame containing a column each for mean, lower 95 and upper 95

Examples

1
2
3
4
5
6
7
library(dplyr)

test <- data.frame(group = rep(letters[1:2], each = 30),
                               dv = c(rnorm(30, 40, 4), rnorm(30,70,4)))
test %>%
   group_by(group) %>%
   do(bootstrapped_summary(.$dv))

tgraf0/xlincHelpers documentation built on May 5, 2019, 1:36 a.m.