This page explains the details of estimating weights using energy balancing by setting method = "energy"
in the call to weightit()
or weightitMSM()
. This method can be used with binary and multinomial treatments.
In general, this method relies on estimating weights by minimizing an energy statistic related to covariate balance. For binary and multinomial treatments, this is the energy distance, which is a multivariate distance between distributions, between treatment groups.
This method relies on code written for WeightIt using osqp()
from the osqp package to perform the optimization. This method may be slow or memory-intensive for large datasets.
Binary Treatments
For binary treatments, this method estimates the weights using osqp()
using formulas described by Huling and Mak (2020). The following estimands are allowed: ATE, ATT, and ATC.
Multinomial Treatments
For multinomial treatments, this method estimates the weights using osqp()
using formulas described by Huling and Mak (2020). The following estimands are allowed: ATE and ATT.
Continuous Treatments
Continuous treatments are not currently supported.
Longitudinal Treatments
For longitudinal treatments, the weights are the product of the weights estimated at each time point. This method is not guaranteed to yield optimal balance at each time point. NOTE: the use of energy balancing with longitudinal treatments has not been validated!
Sampling Weights
Sampling weights are supported through s.weights
in all scenarios. In some cases, sampling weights will cause the optimization to fail due to lack of convexity or infeasible constraints.
Missing Data
In the presence of missing data, the following value(s) for missing
are allowed:
"ind"
(default)First, for each variable with missingness, a new missingness indicator variable is created which takes the value 1 if the original covariate is NA
and 0 otherwise. The missingness indicators are added to the model formula as main effects. The missing values in the covariates are then replaced with 0s (this value is arbitrary and does not affect estimation). The weight estimation then proceeds with this new formula and set of covariates. The covariates output in the resulting weightit
object will be the original covariates with the NA
s.