Efron (1979): B resamples with replacement, the statistic on each.
The replicates estimate the statistic's law under the EMPIRICAL
distribution, not under F – and where that fails it fails without
warning, the sample maximum being the canonical case (its
bootstrap law puts mass 0.632 on the sample max itself). The
caveat is in the output.
Usage
morie_bt_iid(x, stat, B = 1000L, seed = 0)
Arguments
- x
sample.
- stat
the statistic, applied to a resample.
- B
replicates.
- seed
resampling seed.
Value
list: replicates, estimate, se, bias, ci_percentile, B,
n, consistency_caveat, method.
References
Efron (1979), Annals of Statistics 7:1-26.
Examples
set.seed(1)
morie_bt_iid(stats::rnorm(50), mean, B = 100)$se
#> [1] 0.1178038