rlassoIVselectZ {hdm}R Documentation

Instrumental Variable Estimation with Lasso

Description

This function selects the instrumental variables in the first stage by Lasso. First stage predictions are then used in the second stage as optimal instruments to estimate the parameter vector. The function returns an element of class rlassoIVselectZ

Usage

rlassoIVselectZ(x, ...)

## Default S3 method:
rlassoIVselectZ(x, d, y, z, post = TRUE, intercept = TRUE, ...)

## S3 method for class 'formula'
rlassoIVselectZ(formula, data, post = TRUE, intercept = TRUE, ...)

Arguments

x

exogenous variables in the structural equation (matrix)

...

arguments passed to the function rlasso.

d

endogenous variables in the structural equation (vector or matrix)

y

outcome or dependent variable in the structural equation (vector or matrix)

z

set of potential instruments for the endogenous variables. Exogenous variables serve as their own instruments.

post

logical. If TRUE, post-lasso estimation is conducted.

intercept

logical. If TRUE, intercept is included in the second stage equation.

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 rlassoIVselectZ is called.

Details

The implementation follows the procedure described in Belloni et al. (2012). Option post=TRUE conducts post-lasso estimation, i.e. a refit of the model with the selected variables, to estimate the optimal instruments. The parameter vector of the structural equation is then fitted by two-stage least square (tsls) estimation.

Value

An object of class rlassoIVselectZ containing at least the following components:

coefficients

estimated parameter vector

vcov

variance-covariance matrix

residuals

residuals

samplesize

sample size

selection.matrix

matrix of selected variables in the first stage for each endogenous variable

References

D. Belloni, D. Chen, V. Chernozhukov and C. Hansen (2012). Sparse models and methods for optimal instruments with an application to eminent domain. Econometrica 80 (6), 2369–2429.


[Package hdm version 0.3.2 Index]