l2_balance_internal | R Documentation |
Re-weight data to a target with local and global constraints
l2_balance_internal(
Xz,
targetz,
lambda = 0,
lowlim = 0,
uplim = 1,
scale_sample_size = T,
exact_global = T,
target_propz = NULL,
verbose = TRUE,
eps_abs = 1e-05,
eps_rel = 1e-05,
...
)
Xz |
length J list of n_j x d matrix of covariates for each group j |
targetz |
length J list of d-dimensional vectors of targets for each group j |
lambda |
Regularization hyper parameter, default 0 |
lowlim |
Lower limit on weights, default 0 |
uplim |
Upper limit on weights, default 1 |
scale_sample_size |
Whether to scale the dispersion penalty by the sample size of each group, default T |
exact_global |
Whether to enforce exact balance for overall population |
target_propz |
J-dimensional vector of group proportions in the target population, must not be NULL if exact_global is TRUE |
verbose |
Whether to show messages, default T |
eps_abs |
Absolute error tolerance for solver |
eps_rel |
Relative error tolerance for solver |
... |
Extra arguments for osqp solver |
vector of weights solving balancing optimization problem
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.