

Look at help(boot), help(boot.ci), and help(plot.boot) for more details. These include the first order normal approximation, the basic bootstrap interval, the studentized bootstrap interval, the bootstrap percentile interval, and the adjusted bootstrap percentile (BCa) interval. The boot.ci( ) function takes a bootobject and generates 5 different types of two-sided nonparametric confidence intervals. Importance resampling weights can also be specified. For the nonparametric bootstrap, stratified resampling is supported. For the nonparametric bootstrap, resampling methods include ordinary, balanced, antithetic and permutation. The boot( ) function can generate both nonparametric and parametric resampling. Results <- boot(data=mtcars, statistic=bs, # Bootstrap 95% CI for regression coefficientsĭ <- data # allows boot to select sample In this case we add an index parameter to plot( ) and boot.ci( ) to indicate which column in bootobject$t is to analyzed. In the next example we get the 95% CI for the three model regression coefficients (intercept, car weight, displacement). The statistics function you provide can also return a vector. In example above, the function rsq returned a number and boot.ci returned a single confidence interval. The main bootstrapping function is boot( ) and has the following format: This section will get you started with basic nonparametric bootstrapping.

a median), or a vector (e.g., regression weights). You can bootstrap a single statistic (e.g.

The boot package provides extensive facilities for bootstrapping and related resampling methods. Bootstrapping Nonparametric Bootstrapping
