View source: R/cluster_randomization.R
| cluster_randomization | R Documentation |
Randomly assigns clusters (e.g., villages, farms, schools, hospitals) to treatment groups.
cluster_randomization(clusters, groups, seed = NULL)
clusters |
Character or numeric vector of cluster IDs. |
groups |
Character vector of treatment groups. |
seed |
Optional random seed. |
A tibble containing cluster assignments.
cluster_randomization(
clusters = paste0("Farm_", 1:20),
groups = c("Control", "Treatment"),
seed = 123
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.