# Weights for estimating ATE (rather than ATT) in SAS %CEM macro for coarsened exact matching?

I'm running Gary King's %CEM SAS macro (available here) for coarsened exact matching (CEM) for a project at work.

The macro works fine for estimating the Average Treatment Effect on the Treated (ATT) and returns sample weights (labelled Wsc1_stur) for that purpose.

We're also interested in estimating the overall Average Treatment Effect (ATE) using CEM.

Is there an option in the %CEM macro for calculating the ATE?

This option is not available in the %CEM macro. If you have access to stratum membership, you can produce stratum weights manually. For each stratum $$S$$, the treated units get a weight of $$\frac{N_S}{N_{S,1}}$$ and the control units get a weight of $$\frac{N_S}{N_{S,0}}$$, where $$N_S$$ is the number of units in stratum $$S$$, $$N_{S,1}$$ is the number of treated units in stratum $$S$$, and $$N_{S,0}$$ is the number of control units in stratum $$S$$.
It may also be possible to call the R package MatchIt from within SAS (e.g., using the %PROC R macro), which has support for ATE weights form coarsened exact matching.
• The formula they provide is the same except for a scaling factor applied to the weights of $1/\left(1+\frac{N_0}{N_1}\right)$ for treated and $1/\left(1+\frac{N_1}{N_0}\right)$ for control. Including a constant scaling factor doesn't affect balance, the difference in outcome means, or the results of a fully interacted outcome model. In MatchIt, I use a scaling factor (not sure if it's actually this one) to ensure the average of the nonzero is equal to 1 in each group.