plot.boodd {boodd} | R Documentation |
Plot an Object of Class boodd
Description
Plots histograms or density estimates for objects of class boodd
,
which are returned by bootstrap functions such as boots,
bootsemi
, blockboot
, regenboot
, etc.
Usage
## S3 method for class 'boodd'
plot(x, with.density = TRUE, which, byrow = FALSE, ...)
Arguments
x |
An object of class |
with.density |
Logical value indicating whether to plot the estimated density of the bootstrap distribution (default is TRUE). |
which |
Specifies which columns of the data to plot. |
byrow |
Logical value indicating whether to display the matrix of
histograms by row. By default it is |
... |
Optional additional arguments for the |
Details
The function plot.boodd
plots histograms or density estimates of
the output data contained in an object of class boodd
. When the data have
more than one column, the function can display a matrix of (at most 6) histograms.
The argument which
allows the selection of specific columns to plot,
while byrow
controls the layout of the matrix display.
Value
The function returns an invisible list containing the output of the
hist
function.
In the case of multiple histograms, it returns a list of lists.
References
Bertail, P. and Dudek, A. (2025). Bootstrap for Dependent Data, with an R package (by Bernard Desgraupes and Karolina Marek) - submitted.
Efron, B., Tibshirani, R. (1993). An Introduction to the Bootstrap, Chapman and Hall.
See Also
confint.boodd
, summary.boodd
, class.boodd
.
Examples
B <- 299
x <- round(rnorm(15),3)
boo1 <- boots(x, mean, B)
plot(boo1)
# Bootstrap of several statistics
mv <- function(data) {c(mean(data), var(data))} # compute both mean and variance
boo2 <- boots(x, mv, B)
plot(boo2)