Description Usage Arguments Value References Examples
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).
1 | ATTOptPath(y, d, D0, maxsteps = 50, tol, path = NULL, check = FALSE)
|
y |
outcome vector with length |
d |
vector of treatment indicators with length |
D0 |
matrix of distances with dimension |
maxsteps |
maximum number of steps in the solution path. If the full
solution path is shorter than |
tol |
numerical tolerance for rounding error when finding the nearest
neighbors. All observations with effective distance within |
path |
Optionally, supply previous output of |
check |
check at each step that the solution matches that obtained by
direct optimization using |
A list with the following elements:
Output vector, as supplied by y
Vector of treatment indicators, as supplied by d
Matrix of distances, as supplied by D0
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
.
Matrix of weights k associated with the optimal estimator at each step
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):
A vector of length n0
of corresponding to m.
A vector of length n1
of corresponding to r.
A scalar corresponding to the Lagrange multiplier μ.
A matrix of effective distances with dimension n1
by
n0
.
A sparse matrix of Lagrange multipliers Λ with
dimension n1
by n0
.
A sparse matrix of effective nearest neighbors with dimension
n1
by n0
.
An indicator if an observation has been dropped from an active set, or added.
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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.