Skip to contents

Takes a sample with replacement from the population.

Usage

bootstrap(N, n, strata = NULL, balance = FALSE)

Arguments

N

population size.

n

sample size.

strata

(optional) vector of stratification variables. If provided must be of length N

balance

logical, whether to (try to) balance the strata frequency in the output sample. Used only if strata is provided.

Value

A vector of length n containing the index of the computed random set of observations.

Details

This function is an interface to rsample with replace = TRUE.

See also

Author

Alessandro Barberis