EVOLUTION-MANAGER
Edit File: bootstrap.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: Generate 'n' bootstrap replicates.</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 bootstrap {modelr}"><tr><td>bootstrap {modelr}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate <code>n</code> bootstrap replicates.</h2> <h3>Description</h3> <p>Generate <code>n</code> bootstrap replicates. </p> <h3>Usage</h3> <pre> bootstrap(data, n, id = ".id") </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>data</code></td> <td> <p>A data frame</p> </td></tr> <tr valign="top"><td><code>n</code></td> <td> <p>Number of bootstrap replicates to generate</p> </td></tr> <tr valign="top"><td><code>id</code></td> <td> <p>Name of variable that gives each model a unique integer id.</p> </td></tr> </table> <h3>Value</h3> <p>A data frame with <code>n</code> rows and one column: <code>strap</code> </p> <h3>See Also</h3> <p>Other resampling techniques: <code><a href="resample_bootstrap.html">resample_bootstrap</a>()</code>, <code><a href="resample_partition.html">resample_partition</a>()</code>, <code><a href="resample.html">resample</a>()</code> </p> <h3>Examples</h3> <pre> library(purrr) boot <- bootstrap(mtcars, 100) models <- map(boot$strap, ~ lm(mpg ~ wt, data = .)) tidied <- map_df(models, broom::tidy, .id = "id") hist(subset(tidied, term == "wt")$estimate) hist(subset(tidied, term == "(Intercept)")$estimate) </pre> <hr /><div style="text-align: center;">[Package <em>modelr</em> version 0.1.8 <a href="00Index.html">Index</a>]</div> </body></html>