[R] Hausman Test
Achim.Zeileis at uibk.ac.at
Tue Sep 13 08:20:14 CEST 2016
On Mon, 12 Sep 2016, Ding, Jie Ding (NIH/NIA/ERP) [F] wrote:
> Dear Achim,
> Sorry to have disturbed you. I have encountered a problem when computing Hausman test statistics (i.e. p values) in R to compare OLS and 2SLS models.
> The problem is a discrepancy between the two p-value outputs from the "manual approach (by hand)" and the " diagnostics argument" in the "AER" library, respectively.
> With respect to manual approach, I used the following codes:
> x2_diff<-as.vector(t(cf_diff)%*% solve(vc_diff)%*%cf_diff)
> For diagnostic approach, I applied the following:
> summary(ivreg, vcov = sandwich, df = Inf, diagnostics = TRUE)
> However, p-value from the manual approach is always much larger than the
> diagnostic approach, e.g. 0.329 vs. 0.138
> I would expect the values should be the same. Your advice would be
> highly appreciated.
The Wu-Hausman test in ivreg() follows the auugmented regression approach
that is also used by Stata. This regresses the endogenous variable on the
instruments and includes the fitted values in an OLS regression. The test
is then a simple Wald test, see:
> With very best wishes,
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help