View source: R/placebo-simulations.R
randomize_treatment | R Documentation |
randomize treatment to n units with probability pi then if the number of treated units is zero, assign treatment to one unit uniformly at random and if the number of treated units exceeds a cap, remove treatment uniformly at random so it is exactly that cap
randomize_treatment(pi, N, N1)
pi, |
the randomization probabilities |
N, |
the number of units |
N1, |
the cap on the number of treated units |
a binary vector of length N, with ones indicating assignment to treatment
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.