library(boot)
library(bootstrap)
set.seed(1111)
# Function to compute the patch ratio statistic
theta.boot <- function(patch, i) {
y <- patch[i, "y"]
z <- patch[i, "z"]
mean(y) / mean(z)
}
# Bootstrap the patch dataset
boot.out <- boot(bootstrap::patch, statistic = theta.boot, R=2000)
boot.out
ORDINARY NONPARAMETRIC BOOTSTRAP
Call:
boot(data = bootstrap::patch, statistic = theta.boot, R = 2000)
Bootstrap Statistics :
original bias std. error
t1* -0.0713061 0.008458915 0.1009777