The principle of (nonparametric) bootstrapping is to create a number of sample K
of size N
drawn with replacement from the original sample, where N
is the original sample size. The parameters are estimated for each sample separately. This allows computing their confidence intervals, a measure of the variability of the parameters. Apart from making deviations from normal distributions less problematic, using bootstrapping is useful for samples that have a small number of observations (less than 100), as with ours.
We will discuss bootstrapping in Chapter 14, Cross-validation and Bootstrapping Using Caret and Exporting Predictive Models Using PMML, but let's have a sneak-peek now! Bootstrapping is easily performed using several functions in R—for instance, the boot()
function in the boot
package. But let's have a little fun and perform bootstrapping ourselves, 2,000 times. We will first generate the samples and obtain the estimates. We then display the estimates for the first...