summary.ivreg function

Summary and Inference Methods for "ivreg" Objects

Summary and Inference Methods for "ivreg" Objects

Summary method, including Wald tests and (by default) certain diagnostic tests, for "ivreg" model objects, as well as other related inference functions.

## S3 method for class 'ivreg' confint( object, parm, level = 0.95, component = c("stage2", "stage1"), complete = TRUE, vcov. = NULL, df = NULL, ... ) ## S3 method for class 'ivreg' summary(object, vcov. = NULL, df = NULL, diagnostics = NULL, ...) ## S3 method for class 'summary.ivreg' print( x, digits = max(3, getOption("digits") - 3), signif.stars = getOption("show.signif.stars"), ... ) ## S3 method for class 'ivreg' anova(object, object2, test = "F", vcov. = NULL, ...) ## S3 method for class 'ivreg' Anova(mod, test.statistic = c("F", "Chisq"), vcov. = NULL, ...) ## S3 method for class 'ivreg' linearHypothesis( model, hypothesis.matrix, rhs = NULL, test = c("F", "Chisq"), vcov. = NULL, ... )

Arguments

  • object, object2, model, mod: An object of class "ivreg".

  • parm: parameters for which confidence intervals are to be computed; a vector or numbers or names; the default is all parameters.

  • level: confidence level; the default is 0.95.

  • component: Character indicating "stage2" or "stage1".

  • complete: If TRUE, the default, the returned coefficient vector (for coef) or coefficient-covariance matrix (for vcov) includes elements for aliased regressors.

  • vcov.: Optionally either a coefficient covariance matrix or a function to compute such a covariance matrix from fitted ivreg model objects. If NULL (the default) the standard covariance matrix (based on the information matrix) is used. Alternatively, covariance matrices (e.g., clustered and/or heteroscedasticity-consistent) can be plugged in to adjust Wald tests or confidence intervals etc. In summary, if diagnostics = TRUE, vcov. must be a function (not a matrix) because the alternative covariances are also needed for certain auxiliary models in the diagnostic tests. If vcov. is a function, the ... argument can be used to pass on further arguments to this function.

  • df: For summary, optional residual degrees of freedom to use in computing model summary.

  • ...: arguments to pass down.

  • diagnostics: Report 2SLS "diagnostic" tests in model summary (default is TRUE). These tests are not to be confused with the regression diagnostics provided elsewhere in the ivreg

    package: see ivregDiagnostics.

  • x: An object of class "summary.ivreg".

  • digits: Minimal number of significant digits for printing.

  • signif.stars: Show "significance stars" in summary output?

  • test, test.statistic: Test statistics for ANOVA table computed by anova, Anova, or linearHypothesis. Only test = "F" is supported by anova; this is also the default for Anova and linearHypothesis, which also allow test = "Chisq" for asymptotic tests.

  • hypothesis.matrix, rhs: For formulating a linear hypothesis; see the documentation for linearHypothesis for details.

Examples

## data and model data("CigaretteDemand", package = "ivreg") m <- ivreg(log(packs) ~ log(rincome) | log(rprice) | salestax, data = CigaretteDemand) ## summary including diagnostics summary(m) ## replicate global F test from summary (against null model) "by hand" m0 <- ivreg(log(packs) ~ 1, data = CigaretteDemand) anova(m0, m) ## or via linear hypothesis test car::linearHypothesis(m, c("log(rincome)", "log(rprice)")) ## confidence intervals confint(m) ## just the Wald tests for the coefficients library("lmtest") coeftest(m) ## plug in a heteroscedasticity-consistent HC1 covariance matrix (from sandwich) library("sandwich") ## - as a function passing additional type argument through ... coeftest(m, vcov = vcovHC, type = "HC1") ## - as a function without additional arguments hc1 <- function(object, ...) vcovHC(object, type = "HC1", ...) coeftest(m, vcov = hc1) ## - as a matrix vc1 <- vcovHC(m, type = "HC1") coeftest(m, vcov = vc1) ## in summary() with diagnostics = TRUE use one of the function specifications, ## the matrix is only possible when diagnostics = FALSE summary(m, vcov = vcovHC, type = "HC1") ## function + ... summary(m, vcov = hc1) ## function summary(m, vcov = vc1, diagnostics = FALSE) ## matrix ## in confint() and anova() any of the three specifications can be used anova(m0, m, vcov = vcovHC, type = "HC1") ## function + ... anova(m0, m, vcov = hc1) ## function anova(m0, m, vcov = vc1) ## matrix

See Also

ivreg, ivreg.fit, ivregDiagnostics

  • Maintainer: Achim Zeileis
  • License: GPL (>= 2)
  • Last published: 2025-01-19