rlassoIV: Post-Selection and Post-Regularization Inference in Linear...

Description Usage Arguments Details Value References Examples

View source: R/rlassoIV.R

Description

The function estimates a treatment effect in a setting with very many controls and very many instruments (even larger than the sample size).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
rlassoIV(x, ...)

## Default S3 method:
rlassoIV(x, d, y, z, select.Z = TRUE, select.X = TRUE,
  post = TRUE, ...)

## S3 method for class 'formula'
rlassoIV(formula, data, select.Z = TRUE, select.X = TRUE,
  post = TRUE, ...)

rlassoIVmult(x, d, y, z, select.Z = TRUE, select.X = TRUE, ...)

Arguments

x

matrix of exogenous variables

...

arguments passed to the function rlasso

d

endogenous variable

y

outcome / dependent variable (vector or matrix)

z

matrix of instrumental variables

select.Z

logical, indicating selection on the instruments.

select.X

logical, indicating selection on the exogenous variables.

post

logical, wheter post-Lasso should be conducted (default=TRUE)

formula

An object of class Formula of the form " y ~ x + d | x + z" with y the outcome variable, d endogenous variable, z instrumental variables, and x exogenous variables.

data

an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from which rlassoIV is called.

Details

The implementation for selection on x and z follows the procedure described in Chernozhukov et al. (2015) and is built on 'triple selection' to achieve an orthogonal moment function. The function returns an object of S3 class rlassoIV. Moreover, it is wrap function for the case that selection should be done only with the instruments Z (rlassoIVselectZ) or with the control variables X (rlassoIVselectX) or without selection (tsls). Exogenous variables x are automatically used as instruments and added to the instrument set z.

Value

an object of class rlassoIV containing at least the following components:

coefficients

estimated parameter value

se

variance-covariance matrix

References

V. Chernozhukov, C. Hansen, M. Spindler (2015). Post-selection and post-regularization inference in linear models with many controls and instruments. American Economic Review: Paper & Proceedings 105(5), 486–490.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
data(EminentDomain)
z <- EminentDomain$logGDP$z # instruments
x <- EminentDomain$logGDP$x # exogenous variables
y <- EminentDomain$logGDP$y # outcome varialbe
d <- EminentDomain$logGDP$d # treatment / endogenous variable
lasso.IV.Z = rlassoIV(x=x, d=d, y=y, z=z, select.X=FALSE, select.Z=TRUE) 
summary(lasso.IV.Z)
confint(lasso.IV.Z)

## End(Not run)

hdm documentation built on May 1, 2019, 7:56 p.m.