randomizr for Stata: Easy to use tools for common forms of random assignment and sampling

randomizr is designed to make conducting field, lab, survey, or online experiments easier by automating the random assignment process. Social and lab scientists conducting experiments need a process to assign individuals or units of observation to treatment or control wings. Common designs include simple random assignment, complete randomization, block randomization, cluster randomization, and blocked cluster randomization. randomizr automates all of these processes and assists scientists in doing transparent, replicable science.

randomizr for Stata

Installing the latest stable version of randomizr from ssc is easy:

ssc install randomizr

If you would like to install the latest development release directly from GitHub, run the following code:

net install randomizr, from(https://raw.githubusercontent.com/DeclareDesign/strandomizr/master/) replace

Getting started with randomizr for Stata

complete_ra (complete randomization) is the workhorse function that will be most appropriate for a large number of experimental situations: it assigns m of N units to treatment:

ssc install randomizr
set obs 100
complete_ra, m(50)

A Stata version of our online tutorial is also available.

Happy randomizing!