Methods for Instrumental-Variable Regression
Methods to standard generics for instrumental-variable regressions
fitted by ivreg
.
## 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"), ...)
object, object2, x |
an object of class |
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 |
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 |
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. |
... |
currently not used. |
## data data("CigarettesSW") CigarettesSW <- transform(CigarettesSW, rprice = price/cpi, rincome = income/population/cpi, tdiff = (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")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.