Skip to contents

Generic bootstrap CI wrapper for any effect-size function

Usage

bootstrap_effect_size_ci(
  func,
  ...,
  n_boot = 2000L,
  confidence = 0.95,
  seed = 42L
)

Arguments

func

A function taking one or more numeric vectors, returning a scalar.

...

Numeric vectors to bootstrap, in func's argument order.

n_boot

Bootstrap replicates (default 2000).

confidence

Confidence level. Default 0.95.

seed

RNG seed. Default 42.

Value

A morie_effect_size.

Examples

set.seed(1)
x <- rnorm(30)
y <- rnorm(30, mean = 0.6)
r <- bootstrap_effect_size_ci(function(a, b) mean(a) - mean(b),
                              x, y, n_boot = 50L)
r$estimate
#> [1] -0.6503164