boot_mean_ci: Calculate mean and bootstrapped confidence limits using the...

Description Usage Arguments Value Author(s) Examples

Description

Based on https://www.painblogr.org/2017-10-18-purrring-through-bootstraps by Peter Kamerman (@painblogR)

Usage

1
boot_mean_ci(df, value, reps, conf, ...)

Arguments

df

Data frame containing grouping and value fields.

value

Value field for statistics.

reps

Number of bootstrapping repetitions. May need to increase if BCa error occurs.

conf

Confidence limits probability (e.g., 0.95).

...

One or more grouping columns.

Value

Data frame with mean and confidence limits.

Author(s)

Alex M Trueman

Examples

1
2
3
4
5
6
df <- data.frame(
x = rlnorm(n = 100, meanlog = 1.5, sdlog = 1.1),
d = sample(c("a", "b"), 100, replace = TRUE)
)

boot_mean_ci(df, x, reps = 100, conf = 0.9, d)

truemoid/mstats documentation built on May 24, 2019, 7:17 a.m.