
i
i
“K23166” — 2015/1/28 — 9:35 — page 182 — #208
i
i
i
i
i
i
182 CHAPTER 11. SPECIAL TOPICS
> options(digits=4)
> covfun(x)
[1] 106.5
> library(mosaic)
> res = do(2000) * covfun(resample(x))
> quantile(res$result, c(.025, .975))
2.5% 97.5%
98.31 115.56
The percentile interval is simple to calculate from the observed bootstrapped statistics. If
the distribution of the bootstrap samples is approximately normally distributed, a t interval
could be created by calculating the standard deviation of the bootstrap samples and finding
the appropriate multiplier for the confidence interval (more information can be found in the
mosaic package resampling vignette). Plotting