hist.boot {car} | 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 a least-squares regression object. These are method functions for standard generics to
summarize the results of the bootstrap.
## S3 method for class 'boot' hist(x, parm, layout = NULL, ask, main = "", freq = FALSE, estPoint = TRUE, point.col = "black", point.lty = 2, point.lwd = 2, estDensity = !freq, den.col = "blue", den.lty = 1, den.lwd = 2, estNormal = !freq, nor.col = "red", nor.lty = 2, nor.lwd = 2, ci = c("bca", "none", "perc"), 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", "all"), ...) ## S3 method for class 'boot' vcov(object, ...)
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 usual default for |
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 |
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. The vcov
returns the sample covariance of the bootstrap sample estimates.
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. (2011) An R Companion to Applied Regression, Second Edition. Sage.
Fox, J. and Weisberg, S. (2012) Bootstrapping, http://socserv.mcmaster.ca/jfox/Books/Companion/appendix/Appendix-Bootstrapping.pdf.
Weisberg, S. (2013) Applied Linear Regression, Fourth Edition, Wiley
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)