survival_qp: Re-weight control sub-groups to treated sub-group means

View source: R/survival_qp.R

survival_qpR Documentation

Re-weight control sub-groups to treated sub-group means

Description

Re-weight control sub-groups to treated sub-group means

Usage

survival_qp(
  B_X,
  trt,
  times,
  events,
  t,
  lambda = 0,
  lowlim = 0,
  uplim = NULL,
  verbose = TRUE,
  eps_abs = 1e-05,
  eps_rel = 1e-05,
  ...
)

Arguments

B_X

n x k basis matrix of covariates

trt

Vector of treatment assignments

times

Vector of event/censoring times (see events for if event or censoring time)

events

Vector of boolean censoring indicators (whether individual was censored)

t

Time

lambda

Regularization hyperparameter, default 0

lowlim

Lower limit on weights, default 1

uplim

Upper limit on weights, default NULL

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

  • weightsEstimated weights as a length n vector

  • imbalance0Imbalance in covariates for control in vector

  • (imbalance1)Imbalance in covariates for treated in vector


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