[R-SIG-Finance] Chi-sq Hausman test---R vs Stata
frainj at tcd.ie
Mon May 18 17:23:37 CEST 2009
Steven needs to consult a Stata manual. The default in Stata is to
calculate the test statistic based on the covariance matrix of both
the fixed effects an the random effects estimators. This often leads
to a non positive covariance matrix and there is an option to base
the statistic on either estimator. Many persons do not notice this.
The statistic may also be based on auxiliary regressions. You may
thus get some minor differences in your results. Wooldridge's panel
data book or Cameron and Trivedi might provide some more guidance. If
the differences are large you probably have a problem with a
2009/5/18 spencerg <spencer.graves at prodsyse.com>:
> When different methods give different answers for ostensibly the sameproblem with your
> problem, it suggests that there is a difference in assumptions or a bug. I
> suggest you write down the different models and try to understand what is
> different about them that might give different results.
> If this procedure does not lead to enlighte.ment, please submit another
> post but include commented, minimal, self-contained, reproducible code, as
> suggested in the posting guide
> If you'd like to see what else is available in R, you might try
> "RSiteSearch.function", something like the following:
> Hausman <- RSiteSearch.function('Hausman')
> ptsr <- RSiteSearch.function('panel time series regression')
> Hope this helps. Spencer Graves
> Steven Archambault wrote:
>> Hi all,
>> I am running a panel time series regression testing Fixed Effects and
>> Effects. I decided to calculate the chi-sq value for the Hausman test in
>> both R (Phtest) and Stata. I get different results. Even within Stata,
>> calculating the Chi-sq value with the canned procedure or by hand (using
>> matrices) gives different results. So, the question should come up there
>> Does anybody have any insight on how to pick which results to use? I guess
>> the one that gives the result I want? Having different programs give quite
>> different values for the same tests is frustrating me. I'd be interested
>> any feedback folks have!
>> [[alternative HTML version deleted]]
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
> R-SIG-Finance at stat.math.ethz.ch mailing list
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
John C Frain
Trinity College Dublin
mailto:frainj at tcd.ie
mailto:frainj at gmail.com
More information about the R-SIG-Finance