gpbal: Compute optimally balanced Gaussian process propensity scores

Description Usage Arguments Value Examples

Description

Compute optimally balanced Gaussian process propensity scores

Usage

1
2
3
gpbal(X, y, cov_function, init_theta = NULL, verbose = F,
  balance_metric = "mom_sq", approx_method = "ep",
  ep_vers = "parallel", estimand = "ATE", eta = 0.05, tol = 0.01)

Arguments

X

Matrix of covariates to be included in the analysis and balanced on

y

Set of observed treatment assignments (y in (0,1))

cov_function

Covariance matrix; for examples, see sqexp or similar

verbose

Decision to print progress to screen - default TRUE

ep_vers

Sequential or Parallel EP Algorthim - default parallel, alternative sequential

tol

Tolerance of algorithms. Difference between the latent scores at each iteration - default 1e-2

max_iters

Maximum number of iterations of algorithm - default 20

Value

Object that contains the weights obtained from the balancing procedure and parameters from the optimization procedure

The object that is returned is a list that contains the following entries

Examples

1
2
3
4
5
6
7
8
9
n_obs <- 500
X1 <- rnorm(n_obs)
X2 <- rnorm(n_obs)
p <- pnorm( 0.5 * X1 + 0.5 * X2 )
TA <- rbinom(n_obs, 1, p)
dat <- data.frame(X1 = X1, X2 = X2, TA = TA)
covmat <- sqexp(cbind(X1, X2))
system.time(res <- gpbal_fixed(TA, covmat))
plot(res$ps, p, pch = 19, col = rgb(0,0,0,0.5))

bvegetabile/gpbalancer documentation built on May 22, 2019, 1:34 p.m.