The recent question "Why does my bootstrap interval have terrible coverage?" has got me wondering if anybody has some really good examples of distributions in which bootstrapping standard errors systematically outperforms classic estimators (I am not sure what the right terminology for the classic set of estimators... perhaps moment approximation estimators?).
In order to respond to the comment that bootstrapped estimators might be less biased by Ben Ogorek, I have also modified the code (originally posted by Flounderer) to include an estimate of bias and mean squared error. After repeating the simulation 10,000 times, it appears to me that the mean squared errors are statistically identical.
Thanks for your consideration in this matter!
tCI.total <- 0
bootCI.total <- 0
m <- 10 # sample size
Trep <- 10000 # number of repetitions of the proceedure
Brep <- 1000 # number of repetitions of the bootrap
sampv <- mbootv <- rep(0,Trep)
true.mean <- exp(2) + 1
# Clear the coverage index values.
tCI.total <- bootCI.total <- 0
for (i in 1:Trep){
samp <- exp(rnorm(m,0,2)) + 1
sampv[i] <- mean(samp)
tCI <- mean(samp) + c(1,-1)*qt(0.025,df=9)*sd(samp)/sqrt(m)
boot.means <- rep(0,Brep)
for (j in 1:Brep) boot.means[j] <- mean(sample(samp,m,replace=T))
mbootv[i] <- mean(boot.means)
bootCI <- sort(boot.means)[c(0.025*length(boot.means), 0.975*length(boot.means))]
if (true.mean > min(tCI) & true.mean < max(tCI)) tCI.total <- tCI.total + 1
if (true.mean > min(bootCI) & true.mean < max(bootCI)) bootCI.total <- bootCI.total + 1
}
tCI.total/Trep # estimate of t interval coverage probability
# 0.5634
bootCI.total/Trep # estimate of bootstrap interval coverage probability
# 0.5416
# Let's look at bias esimate for the sample mean and the bootrapped population mean estimate
(true.mean - mean(mbootv)) # bias estimate of bootstrapped means
# 0.170623
(true.mean - mean(mbootv))^2 + sd(mbootv)^2 # mean squared error of bootstrapped means
# 198.5914
(true.mean - mean(sampv)) # bias estimate of sample means
# 0.170475
(true.mean - mean(sampv))^2 + sd(sampv)^2 # mean squared error of sample means
# 198.4912