# Boot

##### Bootstrapping for regression models

This function provides a simple front-end to the `boot`

function in the
package also called `boot`

. Whereas `boot`

is very general and therefore
has many arguments, the `Boot`

function has very few arguments, but should
meet the needs of many users.

- Keywords
- regression

##### Usage

```
## S3 method for class 'default':
Boot(object, f=coef, labels=names(coef(object)),
R=999, method=c("case", "residual"))
## S3 method for class 'lm':
Boot(object, f=coef, labels=names(coef(object)),
R=999, method=c("case", "residual"))
## S3 method for class 'glm':
Boot(object, f=coef, labels=names(coef(object)),
R=999, method=c("case", "residual"))
```

##### Arguments

- object
- A regression object of class
`lm`

or`glm`

. The function may work with other regression objects that support the`update`

method and have a`subset`

argument, but it will fail if the fitting method for the mod - f
- A function whose one argument is the name of a regression object that will be applied to the updated regression object to
compute the statistics of interest. The default is
`coef`

, to return to regression coefficient estimates. For example, - labels
- Provides labels for the statistics computed by
`f`

. If this argument is of the wrong length, then generic labels will be generated. - R
- Number of bootstrap samples.
- method
- The bootstrap method, either
case for resampling cases orresiduals for a residual bootstrap. See the details below. The residual bootstrap is available only for`lm`

objects and will return an error for

##### Details

Whereas the `boot`

function is
very general, `Boot`

is very specific. It takes the information from a
regression object and the choice of `method`

, and creates a function that is
passed as the `statistic`

argument to `boot`

. The argument `R`

is also passed to `boot`

. All other arguments to `boot`

are
kept at their default values.
The methods available for `lm`

objects are `boot`

.
This function may fail if the model fit to any of the bootstrap samples is of lower rank than the model fit to the original data. This will occur, for example, if the model includes factors and interactions with a very small number of observations per cell. In this case bootstrap samples may have zero counts in some cells and lose rank.

##### Value

- See
`boot`

for the returned value from this function. The car package includes additional generic functions, as listed below.

##### References

Davison, A, and Hinkley, D. (1997) *Bootstrap Methods and their
Applications*. Oxford: Oxford University Press.
Fox, J. and Weisberg, S. (2011) *Companion to Applied Regression*, Second Edition.
Thousand Oaks: Sage.
Fox, J. and Weisberg, S. (2012) *Bootstrapping*,
*Applied Linear Regression*, Third Edition.
Wiley, Chapters 4 and 11.

##### See Also

Functions that work with
`Boot`

objects from the `boot`

package are
`boot.array`

,
`boot.ci`

,
`plot.boot`

and
`empinf`

. Additional
functions in the `car`

package are
`summary.boot`

,
`confint.boot`

, and
`hist.boot`

.

##### Examples

```
m1 <- lm(Fertility ~ ., swiss)
betahat.boot <- Boot(m1, R=99) # 99 bootstrap samples--too small to be useful
summary(betahat.boot) # default summary
confint(betahat.boot)
hist(betahat.boot)
# Bootstrap for the estimated residual standard deviation:
sigmahat.boot <- Boot(m1, R=99, f=sigmaHat, labels="sigmaHat")
summary(sigmahat.boot)
confint(sigmahat.boot)
```

*Documentation reproduced from package car, version 2.0-13, License: GPL (>= 2)*