R: Methods for Instrumental-Variable Regression

summary.ivreg {AER} | R Documentation

## Methods for Instrumental-Variable Regression

### Description

Methods to standard generics for instrumental-variable regressions fitted by `ivreg`.

### Usage

    ## S3 method for class 'ivreg'
    summary(object, vcov. = NULL, df = NULL, diagnostics = FALSE, ...)
    ## S3 method for class 'ivreg'
    anova(object, object2, test = "F", vcov = NULL, ...)

    ## S3 method for class 'ivreg'
    terms(x, component = c("regressors", "instruments"), ...)
    ## S3 method for class 'ivreg'
    model.matrix(object, component = c("projected", "regressors", "instruments"), ...)

### Arguments

`object, object2, x` | an object of class `"ivreg"` as fitted by `ivreg`.
`vcov., vcov` | a specification of the covariance matrix of the estimated coefficients. This can be specified as a matrix or as a function yielding a matrix when applied to the fitted model. If it is a function it is also employed in the two diagnostic F tests (if `diagnostics = TRUE` in the `summary()` method).
`df` | the degrees of freedom to be used. By default this is set to residual degrees of freedom for which a t or F test is computed. Alternatively, it can be set to `Inf` (or equivalently `0`) for which a z or Chi-squared test is computed.
`diagnostics` | logical. Should diagnostic tests for the instrumental-variable regression be carried out? These encompass an F test of the first stage regression for weak instruments, a Wu-Hausman test for endogeneity, and a Sargan test of overidentifying restrictions (only if there are more instruments than regressors).
`test` | character specifying whether to compute the large sample Chi-squared statistic (with asymptotic Chi-squared distribution) or the finite sample F statistic (with approximate F distribution).
`component` | character specifying for which component of the terms or model matrix should be extracted. `"projected"` gives the matrix of regressors projected on the image of the instruments.
`...` | currently not used.

### Details

`ivreg` is the high-level interface to the work-horse function `ivreg.fit`, a set of standard methods (including `summary`, `vcov`, `anova`, `hatvalues`, `predict`, `terms`, `model.matrix`, `bread`, `estfun`) is available.

### See Also

`ivreg`, `lm.fit`

### Examples

    ## data
    data("CigarettesSW")
    CigarettesSW$rprice <- with(CigarettesSW, price/cpi)
    CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi)
    CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi)

    ## model
    fm <- ivreg(log(packs) ~ log(rprice) + log(rincome) | log(rincome) + tdiff + I(tax/cpi),
      data = CigarettesSW, subset = year == "1995")
    summary(fm)
    summary(fm, vcov = sandwich, df = Inf, diagnostics = TRUE)

    ## ANOVA
    fm2 <- ivreg(log(packs) ~ log(rprice) | tdiff, data = CigarettesSW, subset = year == "1995")
    anova(fm, fm2, vcov = sandwich, test = "Chisq")

[Package AER version 1.2-5 Index]