cbalance: Covariate Balancing Weights via Generalized Projections of...

Description Usage Arguments References

View source: R/cbalance.R

Description

The cbalance() function solves a convex program with linear equality constraints determined by the estimand (estimand), the criterion function (distance), and the sampling weights (base_weights). The function cbalance.fit() provides a more direct means to solving the convex program. However, the constraint matrix and target margins must be determined by the user.

Usage

1
2
3
4
5
6
7
cbalance(formula, data, distance = c("entropy", "binary", "shifted"),
  base_weights = NULL, coefs_init = NULL, optim_ctrl = list(maxit =
  500, reltol = 1e-10), ...)

cfit(cmat, target, distance = c("entropy", "binary", "shifted"),
  base_weights = NULL, coefs_init = NULL, optim_ctrl = list(maxit =
  500, reltol = 1e-10), ...)

Arguments

formula

an object of class formula: a symbolic description of the model to be fitted.

data

a data.frame, list, or environment containing the variables in the model.

distance

the Bregman distance to be optimized. Can either be "entropy" for the relative entropy, "binary" for the binary relative entropy, or "shifted" for the shifted relative entropy. The distance also determines the causal effect estimand. "shifted" produces balancing weights for estimating the average treatment effect, "entropy" for the average treatment effect of the treated, and "binary" for a constant conditional average treatment effect.

base_weights

a vector of optional sampling weights with length equal to the number of rows in cmat or X.

coefs_init

optional initialization points for the dual variables. Defaults to a vector of zeros.

optim_ctrl

a list of arguments that will be passed to optim.

...

additional arguments.

cmat

a matrix that forms the basis of a linear subspace which define the equality constraints of the convex program.

target

the target margins of the linear equality constraints. This vector should have a length equal to the number of columns in cmat.

References

Censor Y, Zenios SA (1998). Parallel Optimization: Theory, Algorithms, and Applications. 1st ed. New York: Oxford University Press.


dewittpe/cbal-v1 documentation built on July 2, 2020, 6:24 p.m.