Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Clustering and fixed effects


From   "Schaffer, Mark E" <M.E.Schaffer@hw.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Clustering and fixed effects
Date   Thu, 27 Apr 2006 18:12:42 +0100

Yvonne, 

> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of 
> Austin Nichols
> Sent: 27 April 2006 17:54
> To: statalist@hsphsun2.harvard.edu
> Subject: Re: st: Clustering and fixed effects
> 
> Note that you must specify the fe option on -xtreg- to get a 
> fixed effects model.  See -help areg- for the answer to your question.
> 
> On 4/27/06, Yvonne Capstick <yvonnecapstick@hotmail.com> wrote:
> > Hi,
> >
> > If I wish to run firm fixed effects in a panel data regression (firm
x 
> > years), an efficient way of doing this is "xtreg y x, i(firm)".
> >
> > An alternative is "qui tab firm, gen dum" and then "reg y x dum*".
The 
> > first method I prefer as I don't see all of the coefficients on the 
> > dummy variables (which I am not interested in) and so the log files 
> > are substantially shorter.
> >
> > I now wish to cluster standard errors by firm as well (since the FE 
> > only removes any constant term). However, I cannot seem to use the
"cluster"
> > command within xtreg: the only thing I can do is "reg y x dum*, 
> > cluster(firm)". But with this method I see all of the coefficients
on 
> > the dummy variables, which I don't want to. Is there a way of having

> > both clustered standard errors and FE without seeing the FE
coefficients?

xtreg supports clustered standard errors only starting with Stata 9.  By
some chance are you using Stata 8 or earlier?  That might explain it.
If so, an option is to use xtivreg2, which requires only Stata 8.2.  It
was designed for IV estimation, but it will support simple fixed effects
with no instrumenting.  Install from ssc in the usual way.

--Mark

> >
> > Thanks, Yvonne
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 
> 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index