View source: R/standardize_rct.R
standardize_rct | R Documentation |
Re-weight groups to target population means
standardize_rct(
X,
trt,
target,
Z,
lambda = 0,
lowlim = 0,
uplim = 1,
scale_sample_size = T,
data_in = NULL,
verbose = TRUE,
return_data = TRUE,
constrain_trt_prop = TRUE,
exact_global = F,
init_uniform = F,
eps_abs = 1e-05,
eps_rel = 1e-05,
...
)
X |
n x d matrix of covariates |
trt |
Vector of treatment assignments |
target |
Vector of population means to re-weight to |
Z |
Vector of group indicators with J levels |
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 |
data_in |
Optional list containing pre-computed objective matrix/vector and constraints (without regularization term) |
verbose |
Whether to show messages, default T |
return_data |
Whether to return the objective matrix and vector and constraints, default T |
constrain_trt_prop |
Whether to constrain the treated proportions within each site to be equal to the observed proportion |
exact_global |
Whether to enforce exact balance for overall population |
init_uniform |
Wheter to initialize solver with uniform weights |
eps_abs |
Absolute error tolerance for solver |
eps_rel |
Relative error tolerance for solver |
... |
Extra arguments for osqp solver |
weights Estimated primal weights as an n x J matrix
imbalance Imbalance in covariates as a d X J matrix
data_out List containing elements of QP min 0.5 x'Px + q'x st l <= Ax <= u
P, q
constraints A, l , u
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.