[R] Hausman Test
Holger Steinmetz
Holger.steinmetz at web.de
Sun Jan 16 15:07:08 CET 2011
Hi,
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:
library(systemfit)
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.
Thanks in advance
Holger
--
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.
More information about the R-help
mailing list