hist.boot | R Documentation |

`boot`

Objects
The `Boot`

function in the car package uses the `boot`

function from the
boot package to do a straightforward case
or residual bootstrap for many regression objects. These are method functions for standard generics to summarize the results of the bootstrap. Other tools for this purpose are available in the `boot`

package.

```
## S3 method for class 'boot'
hist(x, parm, layout = NULL, ask, main = "", freq = FALSE,
estPoint = TRUE, point.col = carPalette()[1], point.lty = 2, point.lwd = 2,
estDensity = !freq, den.col = carPalette()[2], den.lty = 1, den.lwd = 2,
estNormal = !freq, nor.col = carPalette()[3], nor.lty = 2, nor.lwd = 2,
ci = c("bca", "none", "perc", "norm"), level = 0.95,
legend = c("top", "none", "separate"), box = TRUE, ...)
## S3 method for class 'boot'
summary(object, parm, high.moments = FALSE, extremes = FALSE, ...)
## S3 method for class 'boot'
confint(object, parm, level = 0.95, type = c("bca", "norm",
"basic", "perc"), ...)
## S3 method for class 'boot'
Confint(object, parm, level = 0.95, type = c("bca", "norm",
"basic", "perc"), ...)
## S3 method for class 'boot'
vcov(object, use="complete.obs", ...)
```

`x` , `object` |
An object created by a call to |

`parm` |
A vector of numbers or coefficient names giving the coefficients for which a histogram or confidence interval is desired. If numbers are used, 1 corresponds to the intercept, if any. The default is all coefficients. |

`layout` |
If set to a value like |

`ask` |
If |

`main` |
Main title for the graphs. The default is |

`freq` |
The default for the generic |

`estPoint` , `point.col` , `point.lty` , `point.lwd` |
If |

`estDensity` , `den.col` , `den.lty` , `den.lwd` |
If |

`estNormal` , `nor.col` , `nor.lty` , `nor.lwd` |
If |

`ci` |
A confidence interval based on the bootstrap will be added to the histogram
using the BCa method if |

`legend` |
A legend can be added to the (array of) histograms. The value “top” puts at the top-left of the plots. The value “separate” puts the legend in its own graph following all the histograms. The value “none” suppresses the legend. |

`box` |
Add a box around each histogram. |

`...` |
Additional arguments passed to |

`high.moments` |
Should the skewness and kurtosis be included in the summary? Default is FALSE. |

`extremes` |
Should the minimum, maximum and range be included in the summary? Default is FALSE. |

`level` |
Confidence level, a number between 0 and 1. In |

`type` |
Selects the confidence interval type. The types
implemented are the |

`use` |
The default |

`hist`

is used for the side-effect of drawing an array of historgams of
each column of the first argument. `summary`

returns a matrix of
summary statistics for each of the columns in the bootstrap object. The
`confint`

method returns confidence intervals. `Confint`

appends the estimates based on the original fitted model to the left of the confidence intervals.

The function `vcov`

returns the sample covariance of the bootstrap sample estimates, by default skipping any bootstrap samples that returned NA.

Sanford Weisberg, sandy@umn.edu

Efron, B. and Tibsharini, R. (1993)
*An Introduction to the Bootstrap*. New
York: Chapman and Hall.

Fox, J. and Weisberg, S. (2019)
*An R Companion to Applied Regression*, Third Edition. Thousand Oaks: Sage.

Fox, J. and Weisberg, S. (2018) *Bootstrapping Regression Models in R*,
https://www.john-fox.ca/Companion/appendices/Appendix-Bootstrapping.pdf.

Weisberg, S. (2013) *Applied
Linear Regression*, Fourth Edition, Wiley

See Also `Boot`

, `hist`

,
`density`

, Fox and Weisberg (2017), cited above

```
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)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.