Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Testing joint significance of fixed effects in presence of heteroskedasticity and auto-correlation


From   Christopher Baum <kit.baum@bc.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Testing joint significance of fixed effects in presence of heteroskedasticity and auto-correlation
Date   Thu, 10 Jun 2010 09:00:05 -0400

<>
On Jun 10, 2010, at 2:33 AM, Christian wrote:

> Just to be sure, we would be testing the joint significance of fixed
> effects in the presence of heteroskedasticity and auto-correlation by
> using the following code:
> 
> xtreg y x, fe vce(cluster cluster_id)
> scalar rss1 = e(rss)
> scalar dfr = e(df_r)
> scalar dfa = e(df_a)
> regress y x, vce(cluster cluster_id)
> scalar rss2 = e(rss)
> scalar fstat = ((rss2-rss1)/dfa)/(rss1/dfr)
> di "Resid SS with dummies " rss1
> di "Resid SS without dummies " rss2
> di "F statistic with " dfa " and " dfr " d.f. = " fstat
> 
> This example is exactly the one from you we quoted in our initial
> posting, we just replaced areg with xtreg and robust with vce(cluster
> cluster_id) to account for auto-correlation. Would this be a viable
> way or are we overlooking something important?
> 
> When using vce(cluster cluster_id), we noticed that the rss stay the
> same as in the case without vce(cluster cluster_id). Only the df_r
> drop down to the number of clusters - 1 and equals the df_a. The same
> happens when using areg instead of the xtreg-command.
> 
> Is this drop of df_r a problem for the test of fixed-effect
> significance we are looking for?

I don't think so. The cluster-robust estimator does allow for arbitrary autocorrelation within clusters, but I think if you want to test in the context of a HAC estimator, you should use one. E.g., with webuse grunfeld and Schaffer's -xtivreg2- from SSC,

xtivreg2 invest mvalue, fe robust bw(4)
scalar rss1 = e(rss)
scalar dfr = e(Fdf2)
scalar dfa = e(df_a)
ivreg2 invest mvalue, robust bw(4)
scalar rss2 = e(rss)
scalar fstat = ((rss2-rss1)/dfa)/(rss1/dfr)
di "Resid SS with dummies " rss1
di "Resid SS without dummies " rss2
di "F statistic with " dfa " and " dfr " d.f. = " fstat


Kit Baum   |   Boston College Economics & DIW Berlin   |   http://ideas.repec.org/e/pba1.html
                              An Introduction to Stata Programming  |   http://www.stata-press.com/books/isp.html
   An Introduction to Modern Econometrics Using Stata  |   http://www.stata-press.com/books/imeus.html


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index