View source: R/A03-bootstrap-variance.R
| generate_boot_indices | R Documentation |
Helper function to generate bootstrap sample indices for either full sample resampling (observational studies) or stratified resampling within treatment groups (randomized controlled trials with fixed allocation).
generate_boot_indices(data, treatment_var, boot_level = "full")
data |
Data frame to bootstrap from. |
treatment_var |
Name of treatment variable. |
boot_level |
Bootstrap sampling level: "full" (default) samples from entire dataset, "strata" samples within each treatment group preserving group sizes. |
Integer vector of bootstrap indices of length nrow(data).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.