blockTools: Blocking, Assignment, and Diagnosing Interference in Randomized Experiments.
Version 0.4-1
Available as a CRAN package.
28 October 2009


Estimates from randomized experiments constitute the gold standard in social and biomedical research. blockTools offers functionality for designing, conducting, and analyzing aspects of randomized experiments. "Blocking" involves sorting experimental units into homogeneous groups prior to randomization. Randomization then occurs within those groups. blockTools allows experimentalists to easily

Documentation

The many options associated with this functionality are detailed in the blockTools manual.

Installation

To install and load blockTools, open R and type
> install.packages("blockTools")
> library(blockTools)

Using blockTools

There are 3 primary functions of blockTools: block, assignment, and diagnose.

Examples

At the R prompt, type:
> data(x100) ## load the example data
> out <- block(x100, id.vars = "id", block.vars = c("b1", "b2")) ## create blocked pairs
> assg <- assignment(out) ## assign one member of each pair to treatment/control
> diag <- diagnose(assg, x100, id.vars = "id", suspect.var = "b1", suspect.range = c(0,1)) ## detect unit pairs with different treatment assignments that are within 1 unit of each other on variable "b1"

To view the results:
> out$blocks ## blocked pairs
> assg ## assigned pairs
> diag ## pairs with small distances on covariates between them

Citation

If you use this package, please cite as

Moore, Ryan T. "blockTools: Blocking, Assignment, and Diagnosing Interference in Randomized Experiments", Version 0.4-1, October 2009.

For an application, see:

King, Gary, Emmanuela Gakidou, Nirmala Ravishankar, Ryan T. Moore, Jason Lakin, Manett Vargas, Martha María Téllez-Rojo, Juan Eugenio Hernández Ávila, Mauricio Hernández Ávila and Héctor Hernández Llamas. 2007. "A 'Politically Robust' Experimental Design for Public Policy Evaluation, with Application to the Mexican Universal Health Insurance Program". Journal of Policy Analysis and Management, 26(3): 479-509.

Previous versions:

0.3 (29 April 2009)
0.2 (10 April 2008)