Gary King Homepage Previous: U.N. Peacekeeping Up: Identifying Common Support in Next: Using WhatIf with Zelig

Hypothetical Data

To demonstrate that the latter approach really does combine the individual assessments of support on the treatment and control groups, consider this hypothetical data set:

  > sqdata <- data.frame(t = c(1, 1, 1, 1, 0, 0, 0, 0), 
  +                      x = c(0, 0, 1, 1, .5, .5, 1.5, 1.5), 
  +                      y = c(1, 0, 0, 1, .5, 1.5, .5, 1.5))
The variable `t' is the treatment. The convex hull of the observed covariate data of the treatment group is obviously a unit square with its lower left vertex at the origin. The convex hull of the control group is also a unit square, but one with its lower left vertex at the point $ (0.5, 0.5)$ in the Cartesian plane.

We first identify the control group units that are not on the support of the treated units (i.e., the control group units not in the convex hull of the covariate data of the treated group) as follows:

  > summary(whatif(~ x + y, data = sqdata[sqdata$t == 1,], cfact = 
  + sqdata[sqdata$t == 0,]))
which as before uses the parameter formula to eliminate the treatment variable, t, from the data frames. Only the first unit from the control group, the point $ (0.5, 0.5)$ in the Cartesian plane, is in the convex hull and hence on the support of the treated group. We next identify the treated group units that are not on the support of the control units by typing:
  > summary(whatif(~ x + y, data = sqdata[sqdata$t == 0,], cfact = 
  + sqdata[sqdata$t == 1,]))
The treatment group unit represented by the point $ (1, 1)$ is the only one in the convex hull and hence on the support of the control group. Accordingly, if we were to eliminate the units without common support as identified by the two separate tests, we would eliminate all units save the points $ (0.5, 0.5)$ , the only control group unit on the support of the treated group, and $ (1, 1)$ , the only treated group unit on the support of the control group.

Alternatively, we can combine the two steps:

  > summary(whatif(data = sqdata, cfact = cbind(1 - sqdata[, 1], sqdata[, 2:3])))
This time, two counterfactuals are in the convex hull of the data. These counterfactuals correspond to the units with observed covariate data $ (0.5, 0.5)$ and $ (1, 1)$ . Accordingly, we conclude that only two units are on the common support, the same conclusion that we drew from the two separate tests.



Gary King 2010-08-12