eb2 | R Documentation |
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.
eb2(C, M, Q, Z = rep(0, ncol(C)), max_iter = 200, tol = 1e-04, print_level = 1)
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 C'W=M, where W is a column vector representing
the new weights. When called internally, it is a vector of zeros with length equal to the number of
columns in |
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:
|
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. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.