Thin pass-through that adapts an rmorie-style
statistic(data) -> scalar callable to boot::boot's
statistic(data, indices) -> scalar signature and returns
the raw boot object. Useful when the caller wants to use
boot's downstream helpers (boot::boot.ci,
boot::tilt.boot, boot::jack.after.boot) directly.
Arguments
- data
A numeric vector, matrix, or data.frame.
- statistic
Function
f(data) -> scalar.- R
Number of bootstrap replicates.
- strata
Optional integer stratification vector.
- ...
Forwarded to
boot::boot.
Value
A morie_boot object (native; consumable by
morie_boot_basic_ci()).
Examples
set.seed(1)
b <- morie_boot_run(rnorm(50), statistic = mean, R = 200L)
str(b, max.level = 1)
#> List of 7
#> $ t0 : num 0.1
#> $ t : num [1:200, 1] 0.114 0.1 0.1238 -0.0481 0.083 ...
#> $ R : int 200
#> $ data : num [1:50] -0.626 0.184 -0.836 1.595 0.33 ...
#> $ statistic:function (d, i)
#> $ strata : NULL
#> $ index : int [1:200, 1:50] 28 44 48 33 45 21 31 38 17 9 ...
#> - attr(*, "class")= chr "morie_boot"
