Rev 5789 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{boot.array}\alias{boot.array}\title{Bootstrap Resampling Arrays}\description{This function takes a bootstrap object calculated by one of thefunctions \code{boot}, \code{censboot}, or \code{tilt.boot} andreturns the frequency (or index) array for the bootstrapresamples.}\usage{boot.array(boot.out, indices)}\arguments{\item{boot.out}{An object of class \code{"boot"} returned by one of the generationfunctions for such an object.}\item{indices}{A logical argument which specifies whether to return the frequencyarray or the raw index array. The default is \code{indices=FALSE}unless \code{boot.out} was created by \code{tsboot} in which case thedefault is \code{indices=TRUE}.}}\value{A matrix with \code{boot.out$R} rows and \code{n} columns where\code{n} is the number of observations in \code{boot.out$data}. If\code{indices} is \code{FALSE} then this will give the frequency ofeach of the original observations in each bootstrap resample. If\code{indices} is \code{TRUE} it will give the indices of thebootstrap resamples in the order in which they would have been passedto the statistic.}\section{Side Effects}{This function temporarily resets \code{.Random.seed} to the value in\code{boot.out$seed} and then returns it to its original value at theend of the function.}\details{The process by which the original index array was generated isrepeated with the same value of \code{.Random.seed}. If the frequencyarray is required then \code{freq.array} is called to convert theindex array to a frequency array.A resampling array can only be returned when such a concept makessense. In particular it cannot be found for any parametric ormodel-based resampling schemes. Hence for objects generated by\code{censboot} the only resampling scheme for which such an array canbe found is ordinary case resampling. Similarly if \code{boot.out$sim}is \code{"parametric"} in the case of \code{boot} or \code{"model"} inthe case of \code{tsboot} the array cannot be found. Note also thatfor post-blackened bootstraps from \code{tsboot} the indices foundwill relate to those prior to any post-blackening and so will not beuseful.Frequency arrays are used in many post-bootstrap calculations such asthe jackknife-after-bootstrap and finding importance sampling weights.They are also used to find empirical influence values through theregression method.}\seealso{\code{\link{boot}}, \code{\link{censboot}}, \code{\link{freq.array}},\code{\link{tilt.boot}}, \code{\link{tsboot}}}\examples{# A frequency array for a nonparametric bootstrapcity.boot <- boot(city, corr, R = 40, stype = "w")boot.array(city.boot)perm.cor <- function(d,i) cor(d$x,d$u[i])city.perm <- boot(city, perm.cor, R = 40, sim = "permutation")boot.array(city.perm, indices = TRUE)}\keyword{nonparametric}% Converted by Sd2Rd version 1.15.