data(efc)
bs <- bootstrap(efc, 5)
# now run models for each bootstrapped sample
lapply(bs$strap, function(x) lm(neg_c_7 ~ e42dep + c161sex, data = x))
# generate bootstrap samples with 600 observations for each sample
bs <- bootstrap(efc, 5, 600)
# generate bootstrap samples with 70% observations of the original sample size
bs <- bootstrap(efc, 5, .7)
Run the code above in your browser using DataLab