eb2 {rbw} | R Documentation |
Function for Generating Minimum Entropy Weights Subject to a Set of Balancing Constraints
Description
eb2
is an adaptation of eb
that generates
minimum entropy weights subject to a set of balancing constraints. Using
the method of Lagrange multipliers, the dual problem is an unconstrained
optimization problem that can be solved using Newton's method. When a full
Newton step is excessive, an exact line search is used to find the best step
size.
Usage
eb2(C, M, Q, Z = rep(0, ncol(C)), max_iter = 200, tol = 1e-04, print_level = 1)
Arguments
C |
A constraint matrix where each column corresponds to a balancing constraint. |
M |
A vector of moment conditions to be met in the reweighted sample. Specifically,
in the reweighted sample, we should have |
Q |
A vector of base weights. |
Z |
A vector of Lagrange multipliers to be initialized. |
max_iter |
Maximum number of iterations for Newton's method in entropy minimization. |
tol |
Tolerance parameter used to determine convergence. Specifically, convergence is achieved if
|
print_level |
The level of printing:
|
Value
A list containing the results from the algorithm.
W |
A vector of normalized minimum entropy weights. |
Z |
A vector of Lagrange multipliers. |
converged |
A logical indicator for convergence. |
maxdiff |
A scalar indicating the maximum deviation between the moments of the reweighted data and the target moments. |