All of the built-in default functions used in DeclareDesign originate in three standalone packages that can be used as part of DeclareDesign or on their own.

The three packages are:


Making decisions about research design and analysis strategies is often difficult before data is collected, because it is hard to imagine the exact form data will take. Instead, researchers typically modify analysis strategies to fit the data. fabricatr helps researchers imagine what data will look like before they collect it. Researchers can evaluate alternative analysis strategies, find the best one given how the data will look, and precommit before looking at the realized data.


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.


estimatr provides a small set of commonly-used estimators (methods for estimating quantities of interest like treatment effects or regression parameters), with simple, accessible syntax. We include two functions that implement means estimators, difference_in_means() and horvitz_thompson(). In addition, we include two functions for linear regression estimators, lm_robust() and lm_lin(). In each case, scientists can choose an estimator to reflect cluster-randomized, block-randomized, and block-and-cluster-randomized designs.