[R] Hausman Test
Achim.Zeileis at uibk.ac.at
Sun Jan 16 15:39:16 CET 2011
On Sun, 16 Jan 2011, Holger Steinmetz wrote:
> can anybody tell me how the Hausman test for endogenty works?
> I have a simulated model with three correlated predictors (X1-X3). I also
> have an instrument W for X1
> Now I want to test for endogeneity of X1 (i.e., when I omit X2 and X3 from
> the equation).
> My current approach:
> fit2sls <- systemfit(Y~X1,data=data,method="2SLS",inst=~W)
> fitOLS <- systemfit(Y~X1,data=data,method="OLS")
> print(hausman.systemfit(fitOLS, fit2sls))
> This seems to work fine. However, when I include X2 as a furter predictor,
> the 2sls-estimation doesn't work.
When you don't need any instruments for X2, then you should employ
Y ~ X1 + X2, inst = ~ W + X2
Then, regressor X2 is unaltered in the second stage of the regression
(after projection onto the instruments).
> Thanks in advance
> View this message in context: http://r.789695.n4.nabble.com/Hausman-Test-tp3220016p3220016.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> 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