View source: R/srs_bootstrap.r
srs.bootstrap.sample | R Documentation |
Given a survey dataset and a description of the survey design (ie, which combination of vars determines primary sampling units, and which combination of vars determines strata), take a bunch of bootstrap samples under a simple random sampling (with repetition) scheme
srs.bootstrap.sample( survey.data, num.reps = 1, parallel = FALSE, paropts = NULL, ... )
survey.data |
The dataset to use |
num.reps |
The number of bootstrap replication samples to draw |
parallel |
If |
paropts |
An optional list of arguments passed on to |
... |
Ignored, but useful because it allows params like |
A list with num.reps
entries. Each entry is a dataset which has
at least the variables index
(the row index of the original dataset that
was resampled) and weight.scale
(the factor by which to multiply the
sampling weights in the original dataset).
survey <- MU284.surveys[[1]] boot_surveys <- srs.bootstrap.sample(survey, num.reps = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.