- Fixed bug in computing larger of stage-1 and -2 hatvalues in
hatvalues.ivreg()
(reported by Vasilis Syrgkanis).
-
Enhanced
predict.ivreg()
method, which optionally provides standard errors, confidence intervals, and prediction intervals for predicted values. -
The
tinytable
rather than thekableExtra
package (recently not actively maintained) is used now for themodelsummary
table shown in the package vignette (contributed by Vincent Arel-Bundock). -
Further small improvements in the package vignettes.
-
Improve non-anchored links in manual pages (prompted by CRAN).
-
Achim Zeileis took over maintenance, both on CRAN and on GitHub. The GitHub source repository is now at https://github.com/zeileis/ivreg/ with the web page at https://zeileis.github.io/ivreg/.
-
Avoid partial argument matches by calling
model.matrix(..., contrasts.arg = ...)
rather than justcontrasts
(reported by Kevin Tappe). -
Make names of arguments of
influencePlot.ivreg()
andoutlierTest.ivreg()
consistent with the corresponding generic functions from the car package.
-
method
is now an explicit argument toivreg()
and not just passed through...
toivreg.fit()
. -
More efficient computation of regression diagnostics (thanks to improvements implemented by Nikolas Kuschnig).
-
In models without any exogenous variables (i.e., not even an exogenous
(Intercept)
) the$instruments
element in the fitted model object was erroneously empty, leading to some incorrect subsequent computations. Also the$endogenous
element was an unnamed (rather than named) vector. Both problems have been fixed now. (Reported by Luke Sonnet.) -
In the
summary()
method the default is nowdiagnostics = NULL
(rather than alwaysTRUE
). It is now only set toTRUE
if there are both endogenous and instrument variables, andFALSE
otherwise. (Reported by Brantly Callaway.) -
Small fixes.
-
Three-part right-hand side
formula
s are supported now to facilitate specification of models with many exogenous regressors. For example, if there is one exogenous regressorex
and one endogenous regressoren
with instrumentin
, a formula with three parts on the right-hand side can now also be used:y ~ ex | en | in
. This is equivalent to specifying:y ~ en + ex | in + ex
. -
Robust-regression estimators are provided as an alternative to ordinary least squares (OLS) both in stage 1 and 2 by means of
rlm()
from package MASS. Specifically, in addition to 2-stage least squares (2SLS,method = "OLS"
, default)ivreg()
now supports 2-stage M-estimation (2SM,method = "M"
) and 2-stage MM-estimation (2SMM,method = "MM"
). -
Dedicated
confint()
method allowing specification of the variance-covariance matrixvcov.
and degrees of freedomdf
to be used (as in thesummary()
method). -
Include information about which
"regressors"
are endogenous variables and which"instruments"
are instruments for the endogenous variables in the fitted model objects fromivreg()
andivreg.fit()
. Both provide elements$endogenous
and$instruments
which are named integer vectors provided that endogenous/instrument variables exist, and integers of length zero if not. -
Include
df.residual1
element inivreg
objects with the residual degrees of freedom from the stage-1 regression. -
Add
coef(..., component = "stage1")
,vcov(..., component = "stage1")
, andconfint(..., component = "stage1")
for the estimated coefficients and corresponding variance-covariance matrix and confidence intervals from the stage-1 regression (only for the endogenous regressors). (Prompted by a request from Grant McDermott.) -
Add
residuals(..., type = "stage1")
with the residuals from the stage-1 regression (only for the endogenous regressors). -
The
coef()
,vcov()
, andconfint()
methods gained acomplete = TRUE
argument assuring that the elements pertaining to aliased coefficients are included. By settingcomplete = FALSE
these elements are dropped. -
Include demonstration how to use
ivreg()
results in model summary tables and plots using the modelsummary package. -
Small edits to the Diagnostics vignette.
-
Initial version of the
ivreg
package: An implementation of instrumental variables regression using two-stage least-squares (2SLS) estimation, based on theivreg()
function previously in the AER package. In addition to standard regression functionality (parameter estimation, inference, predictions, etc.) the package provides various regression diagnostics, including hat values, deletion diagnostics such as studentized residuals and Cook's distances; graphical diagnostics such as component-plus-residual plots and added-variable plots; and effect plots with partial residuals. -
An overview of the package, documentation, examples, and vignettes are provided at
https://john-d-fox.github.io/ivreg/
.