bpsm(Y, t, X, estimand = "ATE", method = "AI", M = 1, L = 1, K = 10000, S = 1000)
bpsr, modelpsm, modelpsr, Match, sortps
library(boot)
a = 2; b = c(1, -2, 5); N = 500
x1 <- runif(N, 0, 1)
x2 <- runif(N, 0, 1)
X <- as.matrix(cbind(rep(1, N), x1, x2))
p <- inv.logit( X %*% b )
t <- rbinom(N, 1, p)
e <- rnorm(N, 0, 1)
Y <- 5 * t + a * ( x1 + x2 ) + e
bpsm( Y, t, X, method = "AI", estimand = "ATE" )
Run the code above in your browser using DataLab