Skip to contents

Root R = sqrt(n)|t(X*) - t(X)|; inner bootstraps give the prepivoted values u_b = H*_b(R_b); c1 is their (1-alpha) quantile; the critical root is the c1 quantile of the outer root distribution (Beran Eq. 2.7 two-step algorithm).

Usage

morie_btdbl(
  x,
  statistic = NULL,
  alpha = 0.05,
  B_outer = 400,
  B_inner = 200,
  seed = 0
)

Arguments

x

Numeric sample.

statistic

Function(x) -> scalar (default mean).

alpha

1 - confidence level.

B_outer, B_inner

Bootstrap sizes.

seed

SplitMix64 seed (mirrors the Python arm).

Value

A list with elements estimate, lower, upper, critical_root, c_level, alpha, B_outer, B_inner, seed, method.

References

Beran, R. (1987). Prepivoting to reduce level error of confidence sets. Biometrika, 74(3), 457-468.

Examples

set.seed(1)
morie_btdbl(rnorm(40), B_outer = 50L, B_inner = 20L)
#> $estimate
#> [1] 0.09202618
#> 
#> $lower
#> [1] -0.1317357
#> 
#> $upper
#> [1] 0.3157881
#> 
#> $critical_root
#> [1] 1.415195
#> 
#> $c_level
#> [1] 0.95
#> 
#> $alpha
#> [1] 0.05
#> 
#> $B_outer
#> [1] 50
#> 
#> $B_inner
#> [1] 20
#> 
#> $seed
#> [1] 0
#> 
#> $method
#> [1] "Beran (1987) prepivoted double bootstrap (Eq. 2.7)"
#>