EVOLUTION-MANAGER
Edit File: boot.array.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Bootstrap Resampling Arrays</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for boot.array {boot}"><tr><td>boot.array {boot}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Bootstrap Resampling Arrays </h2> <h3>Description</h3> <p>This function takes a bootstrap object calculated by one of the functions <code>boot</code>, <code>censboot</code>, or <code>tilt.boot</code> and returns the frequency (or index) array for the bootstrap resamples. </p> <h3>Usage</h3> <pre> boot.array(boot.out, indices) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>boot.out</code></td> <td> <p>An object of class <code>"boot"</code> returned by one of the generation functions for such an object. </p> </td></tr> <tr valign="top"><td><code>indices</code></td> <td> <p>A logical argument which specifies whether to return the frequency array or the raw index array. The default is <code>indices=FALSE</code> unless <code>boot.out</code> was created by <code>tsboot</code> in which case the default is <code>indices=TRUE</code>. </p> </td></tr></table> <h3>Details</h3> <p>The process by which the original index array was generated is repeated with the same value of <code>.Random.seed</code>. If the frequency array is required then <code>freq.array</code> is called to convert the index array to a frequency array. </p> <p>A resampling array can only be returned when such a concept makes sense. In particular it cannot be found for any parametric or model-based resampling schemes. Hence for objects generated by <code>censboot</code> the only resampling scheme for which such an array can be found is ordinary case resampling. Similarly if <code>boot.out$sim</code> is <code>"parametric"</code> in the case of <code>boot</code> or <code>"model"</code> in the case of <code>tsboot</code> the array cannot be found. Note also that for post-blackened bootstraps from <code>tsboot</code> the indices found will relate to those prior to any post-blackening and so will not be useful. </p> <p>Frequency arrays are used in many post-bootstrap calculations such as the jackknife-after-bootstrap and finding importance sampling weights. They are also used to find empirical influence values through the regression method. </p> <h3>Value</h3> <p>A matrix with <code>boot.out$R</code> rows and <code>n</code> columns where <code>n</code> is the number of observations in <code>boot.out$data</code>. If <code>indices</code> is <code>FALSE</code> then this will give the frequency of each of the original observations in each bootstrap resample. If <code>indices</code> is <code>TRUE</code> it will give the indices of the bootstrap resamples in the order in which they would have been passed to the statistic. </p> <h3>Side Effects</h3> <p>This function temporarily resets <code>.Random.seed</code> to the value in <code>boot.out$seed</code> and then returns it to its original value at the end of the function. </p> <h3>See Also</h3> <p><code><a href="boot.html">boot</a></code>, <code><a href="censboot.html">censboot</a></code>, <code><a href="freq.array.html">freq.array</a></code>, <code><a href="tilt.boot.html">tilt.boot</a></code>, <code><a href="tsboot.html">tsboot</a></code> </p> <h3>Examples</h3> <pre> # A frequency array for a nonparametric bootstrap city.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) </pre> <hr /><div style="text-align: center;">[Package <em>boot</em> version 1.3-22 <a href="00Index.html">Index</a>]</div> </body></html>