[R] Hausman Test
Holger Steinmetz
Holger.steinmetz at web.de
Sun Jan 16 15:53:17 CET 2011
Dear Achim,
thank you very much.
One follow up question. The Hausman-test always gives me a p-value of 1 - no
matter
how small the statistic is.
I now generated orthogonal regressors (X1-X3) and the test gives me
Hausman specification test for consistency of the 3SLS estimation
data: data
Hausman = -0.0138, df = 2, p-value = 1
What is confusing to me is the "3SLS". I am just beginning to learn about
instrumental variables (I am a psychologist ;) Perhaps that's a problem?
As a background, here's the complete simulation:
W = rnorm(1000)
X2 = rnorm(1000)
X3 = rnorm(1000)
X1 = .5*W + rnorm(1000)
Y = .4*X1 + .5*X2 + .6*X3 + rnorm(1000)
data = as.data.frame(cbind(X1,X2,X3,Y,W))
fit2sls <- systemfit(Y~X1,data=data,method="2SLS",inst=~W)
fitOLS <- systemfit(Y~X1,data=data,method="OLS")
print(hausman.systemfit(fitOLS, fit2sls))
Best,
Holger
--
View this message in context: http://r.789695.n4.nabble.com/Hausman-Test-tp3220016p3220065.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list