Instrumental-Variables Regression by '2SLS', '2SM', or '2SMM', with Diagnostics

Instrumental variable estimation for linear models by two-stage least-squares (2SLS) regression or by robust-regression via M-estimation (2SM) or MM-estimation (2SMM). The main ivreg() model-fitting function is designed to provide a workflow as similar as possible to standard lm() regression. A wide range of methods is provided for fitted ivreg model objects, including extensive functionality for computing and graphing regression diagnostics in addition to other standard model tools.


Two-Stage Least-Squares Regression with Diagnostics

An implementation of instrumental variables regression using two-stage least-squares (2SLS) estimation, based on the ivreg() 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.

Instrumental variables regression:

library("ivreg")
ivreg(Q ~ P + D | D + F + A, data = Kmenta)

Via two-stage least squares (2SLS):

2SLS

With diagnostics:

Effects plot QQ plot Influence plot

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("ivreg")

0.6-8 by Achim Zeileis, 3 months ago


https://zeileis.github.io/ivreg/


Report a bug at https://github.com/zeileis/ivreg/issues/


Browse source code at https://github.com/cran/ivreg


Authors: John Fox [aut] , Christian Kleiber [aut] (ORCID: , Achim Zeileis [aut, cre] (ORCID: , Nikolas Kuschnig [ctb] , R Core Team [ctb]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports car, Formula, lmtest, MASS, stats

Suggests AER, effects, knitr, insight, parallel, rmarkdown, sandwich, testthat, modelsummary, gt, ggplot2


Imported by OneSampleMR, csranks, robust2sls.

Depended on by ivgets.

Suggested by PartialNetwork, Rbearcat, clarify, clubSandwich, estimatr, insight, ivcheck, ivreg2r, lmw, marginaleffects, modelsummary, parameters, performance, report, sketching.


See at CRAN