Learn R Programming

REndo (version 1.2)

hetErrorsIV: Fitting Linear Models with Endogenous Regressors using Heteroskedastic Covariance Restictions

Description

This function estimates the model parameters and associated standard errors for a linear regression model with one or more endogenous regressors. Identification is achieved through heteroscedastic covariance restrictions within the triangular system as proposed in Lewbel(2012). The function hetErrorsIV builds on the lewbel function form the ivlewbel package. Changes have been made only to the printing and the summary of the function, as well as the name.

Usage

hetErrorsIV(formula, data, clustervar = NULL, robust = TRUE)

Arguments

formula
an object of class formula.
data
the data frame containing these data. This argument is mandatory.
clustervar
a character value naming the cluster on which to adjust the standard errors and test statistics.
robust
if TRUE the function reports standard errors and test statistics that have been corrected for the presence heteroscedasticity using White's method.

Value

Returns an object of class hetREndo, with the following components:
coefficients
a coefficient matrix with columns containing the estimates, associated standard errors, test statistics and p-values..
call
the matched call.
obs
the number of observations.
jtest
J-test for overidentifying restrictions.
ftest
Partial F-test statistics for weak IV detection.

Details

The formula follows a four-part specification. The following formula is an example: y2 ~ y1 | x1 + x2 + x3 | x1 + x2 | z1. Here, y2 is the dependent variable and y1 is the endogenous regressor. The code x1 + x2 + x3 represents the exogenous regressors whereas the third part x1 + x2 specifies the exogenous heteroscedastic variables from which the instruments are derived. The final part z1 is optional, allowing the user to include tradtional instrumental variables. If both robust=TRUE and clustervar=TRUE, the function overrides the robust command and computes clustered standard errors and test statistics adjusted to account for clustering. The function also computes partial F-statistics that indicate potentially weak identification. In cases where there is more than one endogenous regressor the Angrist-Pischke (2009) method for multivariate first-stage F-statistics is employed.

References

Lewbel, A. (2012). Using Heteroskedasticity to Identify and Estimate Mismeasured and Endogenous Regressor Models,Journal of Business \& Economic Statistics, 30(1), 67-80. Angrist, J. and Pischke, J.S. (2009). Mostly Harmless Econometrics: An Empiricists Companion, Princeton University Press. Fernihough, A. (2014). ivlewbel package: Uses heteroscedasticity to estimate mismeasured and endogenous regressor models.

See Also

lewbel, higherMomentsIV, latentIV, copulaCorrection, ivreg.

Examples

Run this code
data(dataHigherMoments)
dataHetIV <- as.data.frame(dataHigherMoments)
hIV <- hetErrorsIV(y ~ P| X1 + X2 | X1 + X2, data = dataHetIV)
summary(hIV)

Run the code above in your browser using DataLab