Travis-CI Build Status AppVeyor Build Status Coverage Status

An implementation of Díaz, Rau and Rivera (2015) matching estimator for causal inference. The authors propose a matching estimator based on a Bilevel Optimization Problem. In raw terms, the two problems are (1) finding a convex combination that (2) using the closets neighbors possible. The solution to this problem allows computing Treatment Effect estimators that significantly improve balance in case-control studies, and furthermore, can be used for data imputation.

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "README-"
)

Installation

devtools::install_github("gvegayon/blopmatch")

Examples

# Loading the package
library(blopmatch)

# Simulating data
set.seed(1331)
X <- matrix(rnorm(200*5), ncol=5)

# Matching individual 5 to the rest
ans <- blopi_glpk(X[5,,drop=FALSE], X[-5,,drop=FALSE])

# Resulting weights (matches)
ans$lambda

# Target vs Projected
X[5,]
ans$lambda %*% X[-5,]


gvegayon/blopmatch documentation built on Dec. 2, 2019, 6:27 a.m.