[R-SIG-Finance] Chi-sq Hausman test---R vs Stata

John Frain 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
covariance matrix


Best Regards

John

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
> "http://www.R-project.org/posting-guide.html".
>
>     If you'd like to see what else is available in R, you might try
> "RSiteSearch.function", something like the following:
>
> library(RSiteSearch)
> Hausman <- RSiteSearch.function('Hausman')
> HTML(Hausman)
>
> ptsr <- RSiteSearch.function('panel time series regression')
> HTML(ptsr)
>
>
>     Hope this helps.     Spencer Graves
>
>
> Steven Archambault wrote:
>>
>> Hi all,
>>
>> I am running a panel time series regression testing Fixed Effects and
>> Random
>> 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
>> as
>> well.
>>
>> 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
>> in
>> any feedback folks have!
>>
>> Thanks,
>> Steve
>>
>>        [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-SIG-Finance at stat.math.ethz.ch mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> -- Subscriber-posting only.
>> -- If you want to post, subscribe first.
>>
>>
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
>



-- 
John C Frain
Trinity College Dublin
Dublin 2
Ireland
www.tcd.ie/Economics/staff/frainj/home.htm
mailto:frainj at tcd.ie
mailto:frainj at gmail.com



More information about the R-SIG-Finance mailing list