On Sun, 16 Jan 2011, Holger Steinmetz wrote:
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.
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).
hth,
Z
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.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.