ivregMethods function

Methods for "ivreg" Objects

Methods for "ivreg" Objects

Various methods for processing "ivreg" objects; for diagnostic methods, see ivregDiagnostics.

## S3 method for class 'ivreg' coef(object, component = c("stage2", "stage1"), complete = TRUE, ...) ## S3 method for class 'ivreg' vcov(object, component = c("stage2", "stage1"), complete = TRUE, ...) ## S3 method for class 'ivreg' bread(x, ...) ## S3 method for class 'ivreg' estfun(x, ...) ## S3 method for class 'ivreg' vcovHC(x, ...) ## S3 method for class 'ivreg' terms(x, component = c("regressors", "instruments", "full"), ...) ## S3 method for class 'ivreg' model.matrix( object, component = c("regressors", "projected", "instruments"), ... ) ## S3 method for class 'ivreg_projected' model.matrix(object, ...) ## S3 method for class 'ivreg' predict( object, newdata, type = c("response", "terms"), na.action = na.pass, se.fit = FALSE, interval = c("none", "confidence", "prediction"), df = Inf, level = 0.95, weights, ... ) ## S3 method for class 'ivreg' print(x, digits = max(3, getOption("digits") - 3), ...) ## S3 method for class 'ivreg' update(object, formula., ..., evaluate = TRUE) ## S3 method for class 'ivreg' residuals( object, type = c("response", "projected", "regressors", "working", "deviance", "pearson", "partial", "stage1"), ... ) ## S3 method for class 'ivreg' Effect(focal.predictors, mod, ...) ## S3 method for class 'ivreg' formula(x, component = c("complete", "regressors", "instruments"), ...) ## S3 method for class 'ivreg' find_formula(x, ...) ## S3 method for class 'ivreg' alias(object, ...) ## S3 method for class 'ivreg' qr(x, ...) ## S3 method for class 'ivreg' weights(object, type = c("variance", "robustness"), ...)

Arguments

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

  • component: For terms, "regressors", "instruments", or "full"; for model.matrix, "projected", "regressors", or "instruments"; for formula, "regressors", "instruments", or "complete"; for coef and vcov, "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.

  • ...: arguments to pass down.

  • x: An object of class "ivreg".

  • newdata: Values of predictors for which to obtain predicted values; if missing predicted (i.e., fitted) values are computed for the data to which the model was fit.

  • type: For predict, one of "response" (the default) or "terms"; for residuals, one of "response" (the default), "projected", "regressors", "working", "deviance", "pearson", or "partial"; type = "working" and "response" are equivalent, as are type = "deviance" and "pearson"; for weights, "variance" (the default) for invariance-variance weights (which is NULL for an unweighted fit) or "robustness" for robustness weights (available for M or MM estimation).

  • na.action: na method to apply to predictor values for predictions; default is na.pass.

  • se.fit: Compute standard errors of predicted values (default FALSE).

  • interval: Type of interval to compute for predicted values: "none" (the default), "confidence" for confidence intervals for the expected response, or "prediction" for prediction intervals for future observations.

  • df: For predict, degrees of freedom for computing t-distribution confidence- or prediction-interval limits; the default, Inf, is equivalent to using the normal distribution; if NULL, df is taken from the residual degrees of freedom for the model. These tests are not to be confused with the regression diagnostics provided elsewhere in the ivreg

    package: see ivregDiagnostics.

  • level: for confidence or prediction intervals, default 0.95.

  • weights: Either a numeric vector or a one-sided formula to provide weights for prediction intervals when the fit is weighted. If weights and newdata are missing, the weights are those used for fitting the model.

  • digits: For printing.

  • formula.: To update model.

  • evaluate: If TRUE, the default, the updated model is evaluated; if FALSE the updated call is returned.

  • focal.predictors: Focal predictors for effect plot, see Effect.

See Also

ivreg, ivreg.fit, ivregDiagnostics

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