ATTOptPath: Class of optimal linear estimators for the ATT

Description Usage Arguments Value References Examples

View source: R/att_estimate.R

Description

Use a LASSO-like algorithm to compute the solution path {hatL_delta}_{delta>0} tracing out the class of optimal linear estimators that minimize variance subject to a bound on bias. The output of this function is used by ATTOptEstimate for optimal estimation and inference on the conditional average treatment effect for the treated (CATT) and population average treatment effect for the treated (PATT).

Usage

1
ATTOptPath(y, d, D0, maxsteps = 50, tol, path = NULL, check = FALSE)

Arguments

y

outcome vector with length n.

d

vector of treatment indicators with length n.

D0

matrix of distances with dimension n1 by n0 between untreated and treated units, where n0 is the number of untreated units and n1 is the number of treated units.

maxsteps

maximum number of steps in the solution path. If the full solution path is shorter than maxsteps, compute the whole path.

tol

numerical tolerance for rounding error when finding the nearest neighbors. All observations with effective distance within tol of the closest are considered to be active.

path

Optionally, supply previous output of ATTOptPath. If not provided, the path is started at the beginning (at δ=0). If provided, it starts at the step where the previous call to ATTOptPath ended.

check

check at each step that the solution matches that obtained by direct optimization using CVXR-package (generic convex optimizer package).

Value

A list with the following elements:

y

Output vector, as supplied by y

d

Vector of treatment indicators, as supplied by d

D0

Matrix of distances, as supplied by D0

res

A matrix with rows corresponding to steps in the solution path, so that the maximum number of rows is maxsteps, and columns corresponding to the state variables δ, m, r, μ, and drop.

K

Matrix of weights k associated with the optimal estimator at each step

ep

A data frame with columns delta, omega, maxbias, and att, corresponding to δ, ω(δ), the scaled worst-case bias, and the ATT estimate.

The remaining elements are state variables at the last step of the solution path (see Appendix A in Armstrong and Kolesár (2020) for details and notation):

m0

A vector of length n0 of corresponding to m.

r0

A vector of length n1 of corresponding to r.

mu

A scalar corresponding to the Lagrange multiplier μ.

D

A matrix of effective distances with dimension n1 by n0.

Lam

A sparse matrix of Lagrange multipliers Λ with dimension n1 by n0.

N0

A sparse matrix of effective nearest neighbors with dimension n1 by n0.

drop

An indicator if an observation has been dropped from an active set, or added.

References

Armstrong, T. B., and M. Kolesár (2020): Finite-Sample Optimal Estimation and Inference on Average Treatment Effects Under Unconfoundedness, https://arxiv.org/abs/1712.04594

Examples

1
2
3
4
5
6
7
8
x0 <- c(0, 1, 2, 3)
x1 <- c(1, 4, 5)
d <- c(rep(FALSE, length(x0)), rep(TRUE, length(x1)))
D0 <- distMat(c(x0, x1), d=d)
## Compute first three steps
p1 <- ATTOptPath(d, d, D0, maxsteps=3)
## Compute the remaining steps, checking them against CVX solution
ATTOptPath(path=p1, maxsteps=50, check=TRUE)

kolesarm/ATEHonest documentation built on Nov. 14, 2020, 4:50 a.m.