A new command for entropy balancing is now available from SSC. Type

Code:
. ssc install ebalfit
to install the command. The latest update of moremata is required; type

Code:
. ssc install moremata, replace
The goal of entropy balancing is to find weights that balance data between groups, for example in treatment effect estimation. It is similar to inverse probability weighing (IPW), but unlike regular IPW, entropy balancing achieves perfect balance (if feasible). Entropy balancing can also be used, for example, to adjust a sample to known population distributions.

The new command called ebalfit estimates an entropy balancing model (similar to a logit model) and displays its coefficients along with standard errors. predict can then be used to generate the balancing weights or the propensity score implied by the model. Variance estimation is based on influence functions, which can be stored for further usage (e.g. to correct standard errors of statistics computed using the balancing weights).

The heavy lifting is done in Mata; see the new mm_ebalance() function in moremata.

ben