[R] Hausman Test
Arne Henningsen
arne.henningsen at googlemail.com
Sun Jan 16 16:28:15 CET 2011
Hi Holger!
On 16 January 2011 15:53, Holger Steinmetz <Holger.steinmetz at web.de> wrote:
> 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))
Please do read the documentation of hausman.systemfit(). I regret that
comparing 2SLS with OLS results has not been implemented yet:
====== part of documentation of hausman.systemfit() =================
Usage:
hausman.systemfit( results2sls, results3sls )
Arguments:
results2sls : result of a _2SLS_ (limited information) estimation
returned by ‘systemfit’.
results3sls : result of a _3SLS_ (full information) estimation
returned by ‘systemfit’.
Details:
The null hypotheses of the test is that all exogenous variables
are uncorrelated with all disturbance terms. Under this
hypothesis both the 2SLS and the 3SLS estimator are consistent but
only the 3SLS estimator is (asymptotically) efficient. Under the
alternative hypothesis the 2SLS estimator is consistent but the
3SLS estimator is inconsistent.
The Hausman test statistic is
m = ( b_2 - b_3 )' ( V_2 - V_3 ) ( b_2 - b_3 )
where $b_2$ and $V_2$ are the estimated coefficients and their
variance covariance matrix of a _2SLS_ estimation and $b_3$ and
$V_3$ are the estimated coefficients and their variance covariance
matrix of a _3SLS_ estimation.
=========================================
Please don't hesitate to write a new version of hausman.systemfit()
that can also compare 2SLS with OLS results.
Best regards from Copenhagen,
Arne
--
Arne Henningsen
http://www.arne-henningsen.name
More information about the R-help
mailing list