eb_target | R Documentation |
eb_target
is a wrapper for energybalance
that focuses on using it to estimate energy balancing weights for matching a sample distribution to a target distribution, i.e., for the purposes of generalizability, transportability, or estimating the average treatment effect in the treated (ATT). The energy distance between the sample distribution and the target distribution is minimized.
eb_target(sampleX, targetX, sampleW = NULL, targetW = NULL, std = "studentized", lambda = 0)
sampleX |
a matrix or data frame of covariates composing the sample distribution to be weighted. See |
targetX |
a matrix or data frame of covariates composing the target distribution. See |
sampleW |
optional; a vector of sampling weights for the sample. The product of the estimated weights and |
targetW |
optional; a vector of sampling weights for the target. |
std |
|
lambda |
a penalty on the sum of the squared weights. |
A vector of weights, one for each row of sampleX
.
Noah Greifer
energybalance
for a more flexible interface
eb_att
for a more dedicated function for estimating weights for the ATT, especially with multiple control groups.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.