IVreg: Instrumental Variables Regression

Description Usage Arguments Value References Examples

View source: R/manyiv.R

Description

Fit instrumental variables regression by a number of methods, and compute associated standard errors, as specified by inference

Usage

1
IVreg(formula, data, subset, na.action, inference = "standard", approx = TRUE)

Arguments

formula

Specification of the regression relationship and the instruments of the form y ~ x + w1 + w2 | z1 + z2 + z3, where y is the outcome variable, x is a scalar endogenous variable, w1, w2 are exogenous regressors, and z1, z2, and z3 are excluded instruments.

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 the function is called.

subset

An optional vector specifying a subset of observations to be used in the fitting process.

na.action

A function indicating what should happen when the data contain NAs. The default is set by the na.action setting of options (usually na.omit).

inference

Vector specifying inference method(s). The elements of the vector can consist of the following methods:

"standard"

Report inference based on TSLS, LIML, and MBTSLS, along with homoskedastic and heteroskedasticity-robust standard errors, standard errors that are valid under heteroskedasticity and treatment effect heterogeneity. All three standard errors are valid under standard asymptotics only.

"re"

Report standard errors for LIML based on Hessian of random effects likelihood

"il"

Report standard errors for LIML based on Hessian of invariant likelihood, evaluated numerically

"lil"

Report standard errors for LIML based on the information matrix of limited information likelihood

"md"

Compute the EMD, LIML, and MBTSLS estimators, and report standard errors for LIML, MBTSLS, and EMD based on the minimum distance objective function proposed in Kolesár (2018)

See the vignette vignette("ManyIV", package = "ManyIV") for a detailed description of these methods.

approx

if TRUE, then estimates of third and fourth moments used in inference based on the minimum distance objective function (inference="md") are based on an approximation to speed up the calculations.

Value

An object of class "IVResults", which is a list with the following components:

IVData

An object of class "IVData", which is a list with at least the following components:

Z

Matrix of instruments

Y

Matrix with two columns collecting the endogenous variables

W

Matrix of exogenous regressors

n

Number of observations used, the number of rows of Z, W, or Yp

l

Dimension of the exogenous regressors, the number of columns of W

k

Dimension of the instruments, the number of columns of Z

F

First-stage F statistic

call

The matched call.

estimate

A data frame containing the estimation results.

The print function can be used to print a summary of the results.

References

Kolesár, Michal. Minimum Distance Approach to Inference with Many Instruments.” Journal of Econometrics 204 (1): 86–100.

Examples

1
2
3
4
## Use quarter of birth as an instrument for education, controlling for
## marriage and black indicators
IVreg(lwage~education+black+married | as.factor(qob),
           data=ak80, inference=c("standard", "re", "il", "lil"))

kolesarm/ManyIV documentation built on March 13, 2021, 6:31 a.m.