-
New methods for
dffits()generic in R-devel (to be 4.6.0) forivregandinfluence.ivregobjects. Internally, these just callinfluece(...)$dffitswhich is the recommended usage for earlier versions of R. -
The test scripts have been updated accordingly to avoid errors in the CRAN checks using R-devel.
-
A warning is issued now in
ivreg.fit()if there are any collinear instruments. -
If a model is specified where the instruments perfectly predict all regressors, a warning is now issued that no endogenous variables could be detected and that all regressors appear to be exogenous (reported by Alex Hayes in #23).
-
Additionally, the documentation clarifies that fitting a model with only a single right-hand side (i.e., treating all regressors as exogenous) is possible for convenience, e.g., to facilitate model comparisons. This now also works correctly for M and MM estimation.
-
The numeric checks of which variables are exogenous/endogenous/instruments have been improved and are a little more rigorous now.
-
The
summary()method now also works correctly if there are aliased coefficients that areNA(reported by Alex Hayes in #24). -
An error is issued now if
vcovHC(..., component = "stage1")is requested because currently only"stage2"(the default) is supported (reported in #26 by Matthew Bhagat-Conway). -
Now
weights(..., type = "working")also works forivregobjects. These are simply the weights already available previously asweights(..., type = "variance")as these are now used in computations oflm.influence(), e.g.,dffits().
- Better documentation for summary and inference methods for
ivreg()objects with a dedicated manual page?summary.ivreg. Along with thesummary()method this also documents the methods forconfint(),anova(),Anova(), andlinearHypothesis(). All of these take an argumentvcov.so that alternative (e.g., so-called "robust") covariance matrices can be plugged in. Thevcov.processing is made somewhat more convenient and consistent (suggested by Diogo Ferrari).
- 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
tinytablerather than thekableExtrapackage (recently not actively maintained) is used now for themodelsummarytable 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.
-
methodis 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$instrumentselement in the fitted model object was erroneously empty, leading to some incorrect subsequent computations. Also the$endogenouselement 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 toTRUEif there are both endogenous and instrument variables, andFALSEotherwise. (Reported by Brantly Callaway.) -
Small fixes.
-
Three-part right-hand side
formulas are supported now to facilitate specification of models with many exogenous regressors. For example, if there is one exogenous regressorexand one endogenous regressorenwith 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 freedomdfto 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$endogenousand$instrumentswhich are named integer vectors provided that endogenous/instrument variables exist, and integers of length zero if not. -
Include
df.residual1element inivregobjects 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 = TRUEargument assuring that the elements pertaining to aliased coefficients are included. By settingcomplete = FALSEthese 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
ivregpackage: 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/.