stochastic_int: Balance towards a stochastic intervention

View source: R/stochastic_intervention.R

stochastic_intR Documentation

Balance towards a stochastic intervention

Description

Balance towards a stochastic intervention

Usage

stochastic_int(
  X,
  trt,
  stoch_int,
  Z = NULL,
  lambda = 0,
  lowlim = 0,
  uplim = Inf,
  exact_global = FALSE,
  verbose = TRUE,
  eps_abs = 1e-05,
  eps_rel = 1e-05,
  ...
)

Arguments

X

n x d matrix of covariates

trt

Vector of K-level treatment assignments

stoch_int

n x K matrix of treatment probabilities under stochastic intervention

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

exact_global

Whether to enforce exact balance for overall population

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

Value

  • weights Estimated weights as a length n vector

  • imbalance Imbalance in covariates as a d X J matrix

  • global_imbalanceOverall imbalance in covariates, as a length d vector


ebenmichael/balancer documentation built on Jan. 17, 2024, 2:56 p.m.