gpbal_fixed: Compute posterior approximation given observed treatment...

Description Usage Arguments Value Examples

Description

Compute posterior approximation given observed treatment assignments and a fixed covariance matrix

Usage

1
2
gpbal_fixed(y, cov_matrix, tol = 0.01, max_iters = 20, verbose = T,
  approx_method = "ep", ep_vers = "parallel")

Arguments

y

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

cov_matrix

Covariance matrix; for examples, see sqexp or similar

tol

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

max_iters

Maximum number of iterations of the algorithm - default 20

verbose

Decision to print progress to screen - default TRUE

approx_method

Approximation method for posterior: 'ep' or 'laplace'

ep_vers

'Sequential' or 'Parallel' EP Algorithm - default parallel, alternative sequential

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.