Statistics 5601 (Geyer, Fall 2003) Examples: Bootstrap Percentile

General Instructions

To do each example, just click the "Submit" button. You do not have to type in any R instructions or specify a dataset. That's already done for you.

Bootstrap Percentile Intervals

Section 13.3 in Efron and Tibshirani.

External Data Entry

Enter a dataset URL :

• Everything down to the bottom of the `for` loop should be familiar, just like what we did calculating bootstrap standard errors (`sd(theta.star)` would be the bootstrap standard error).

• The R function `quantile` calculates quantiles of a data vector, at least, what it calls quantiles. Its definition is a bit eccentric, but is asymptotically equivalent to all other definitions of quantiles.

• If you want, for example, a 90% equal-tailed confidence interval, you replace the definition of `conf.level` by
```conf.level <- 0.90
```

Bootstrap Percentile Intervals, Take Two

An alternative method for quantiles preferred by your humble instructor uses the following logic.

Use `nboot <- 999` (or some other value such that `nboot + 1` is a round number. The reason is that if X(i) is the i-th order statistic from a Uniform(0, 1) distribution

E{X(i)} = i / (n + 1)

Another way to think of this is that the `nboot` data points divide the number line into `nboot + 1` intervals, which as far as we know contain equal probability. They don't contain equal probability because the sample is not the population, but we might as well treat them as such for the purposes of estimation. That is, our `nboot` data points should be taken as estimators of the quantiles with denominators `nboot + 1`

In particular, if `nboot` is 999, then we take the ordered `theta.star` values to be the 0.001, 0.002, . . ., 0.999 quantiles of the sampling distribution of `theta.hat`. Thus

External Data Entry

Enter a dataset URL :