Statalist


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

Re: st: Why option "robust" and "cluster" doesn't work?


From   "Thomas Jacobs" <[email protected]>
To   [email protected]
Subject   Re: st: Why option "robust" and "cluster" doesn't work?
Date   Wed, 24 Oct 2007 10:05:34 -0500

Alejandro,

Version 10 certainly does permit using cluster with the vce option
after either xtreg, fe or xtreg, re.

For example, on another post I made a day or so ago (more complicated
than necessary but is all I have handy at the moment):

. xi: xtreg slope15y i.moodyrating|Mslope15y swap15slope, fe
vce(cluster mktconum)
i.moodyrating     _Imoodyrati_0-19    (naturally coded; _Imoodyrati_0 omitted)
i.mood~gMs~15y   _ImooXMslo_#        (coded as above)
note: robust covariance is not full rank; F test numerator degrees of
freedom is 20   instead of
>  21

Fixed-effects (within) regression               Number of obs      =    166351
Group variable: mktconum                        Number of groups   =       190

R-sq:  within  = 0.2843                         Obs per group: min =         9
between = 0.4482                                        avg =     875.5
overall = 0.3139                                        max =      1493

F(20,189)          =    340.39
corr(u_i, Xb)  = 0.1384                         Prob > F           =    0.0000

(Std. Err. adjusted for 190 clusters in mktconum)

Robust
slope15y       Coef.   Std. Err.      t    P>t     [95% Conf. Interval]

Mslope15y    .8421038   .1025912     8.21   0.000      .639733    1.044475
_ImooXMslo_1   -.2351284   .0403382    -5.83   0.000    -.3146995   -.1555574
_ImooXMslo_2   -.6510598   .1111743    -5.86   0.000    -.8703616    -.431758
_ImooXMslo_3   -.5825345   .1362484    -4.28   0.000    -.8512975   -.3137716
_ImooXMslo_4   -.8162742   .1011095    -8.07   0.000    -1.015722   -.6168261
_ImooXMslo_5   -.8239694    .102474    -8.04   0.000    -1.026109   -.6218296
_ImooXMslo_6   -.8419379   .1045057    -8.06   0.000    -1.048085   -.6357904
_ImooXMslo_7   -.8438201   .1048161    -8.05   0.000     -1.05058   -.6370603
_ImooXMslo_8   -.8060444       .105    -7.68   0.000    -1.013167   -.5989219
_ImooXMslo_9   -.8368847   .1060561    -7.89   0.000     -1.04609    -.627679
_ImooXMsl~10   -.8185907   .1042997    -7.85   0.000    -1.024332   -.6128495
_ImooXMsl~11   -.7526583   .1029494    -7.31   0.000    -.9557356   -.5495809
_ImooXMsl~12   -.8299127   .1012824    -8.19   0.000    -1.029702   -.6301234
_ImooXMsl~13   -.7959784   .1073662    -7.41   0.000    -1.007768   -.5841882
_ImooXMsl~14    -.854819    .102767    -8.32   0.000    -1.057537   -.6521013
_ImooXMsl~15   -.7806554   .1084974    -7.20   0.000    -.9946768   -.5666341
_ImooXMsl~16   -.9274818   .1939613    -4.78   0.000    -1.310089   -.5448747
_ImooXMsl~17    -.842949   .1033795    -8.15   0.000    -1.046875   -.6390232
_ImooXMsl~18    .0061745   .1018397     0.06   0.952    -.1947139    .2070629
_ImooXMsl~19   -.6648868   .1018489    -6.53   0.000    -.8657935   -.4639801
swap15slope   -.1419077    .030575    -4.64   0.000    -.2022198   -.0815956
_cons    .0048621   .0003458    14.06   0.000     .0041799    .0055442

sigma_u   .00455044
sigma_e   .01011707
rho   .16826102   (fraction of variance due to u_i)

On 10/24/07, feldman <[email protected]> wrote:
> But if you use xtreg, fe the vce() option doesn�t allow
> cluster so that still doesn�t answer why cluster after
> xtreg, fe was allowed in Stata 9 but not in Stata 10.
>
> Alejandro
>
> ----- Original Message Follows -----
> From: "E. Paul Wileyto" <[email protected]>
> To: [email protected]
> Subject: Re: st: Why option "robust" and "cluster" doesn't
> work?
> Date: Tue, 23 Oct 2007 13:40:51 -0400
>
> > Try using the more general vce option.  I got surprised by
> > this earlier  as well, and found that while cluster()
> > still works for many of the  routines, vce will often work
> > when cluster will not.
> >
> > I can see why the Stata Gods have deemed this good.  It
> > subsumes  clustering, bootstrapping, jackknife, and all
> > manner of methods under  one option.
> >
> > Paul
> >
> > feldman wrote:
> > > But why was the cluster option available in Stata 9 and
> > > is not in Stata 10?
> > >
> > > ----- Original Message Follows -----
> > > From: "Schaffer, Mark E" <[email protected]>
> > > To: <[email protected]>
> > > Subject: RE: st: Why option "robust" and "cluster"
> > > doesn't work?
> > > Date: Sun, 21 Oct 2007 21:10:39 +0100
> > >
> > >
> > >> Ngoc Anh Vo Thi,
> > >>
> > >>
> > >>> -----Original Message-----
> > >>> From: [email protected]
> > >>> [mailto:[email protected]] On
> > Behalf >>> Of  Maarten buis
> > >>> Sent: 21 October 2007 10:49
> > >>> To: [email protected]
> > >>> Subject: Re: st: Why option "robust" and "cluster"
> > >>> doesn't work?
> > >>> --- Ngoc Anh Vo Thi <[email protected]> wrote:
> > >>>
> > >>>> I'm estimating a panel data model with xtreg, fe
> > using >>>>
> > >>> Stata 8.2, and
> > >>>
> > >>>> want to obtain robust standard errors and test stat.
> > >>>>
> > >>> However, when I
> > >>>
> > >>>> add the "robust"/ "cluster" option after fe, it
> > >>>>
> > >>> doesn't  work. It was
> > >>>
> > >>>> said "Option robust not allowed". I'm wondering
> > >>>>
> > >>> whether  there's a bug
> > >>>
> > >>>> with my version of Stata.
> > >>>>
> > >>> There isn't a bug in your version of Stata, that
> > option >>> is  not allowed. If you type -help xtreg- you
> > will find >>> a list of  legal options, and -robust- isn't
> > in that >>>
> > >> list, nor is it in Stata 10.
> > >>
> > >> It's available in Stata 9, but that doesn't help
> > someone >> who has only Stata 8.2 available.
> > >>
> > >> -xtivreg2- will do you what you want, though - it
> > requires >> only Stata 8.2.  You'll also need to install
> > -ivreg28-, >> which, as the "8" suggests, also runs in
> > Stata 8.2.  Just >> -findit xtivreg2- and -findit ivreg28-
> > from within Stata, >> and follow the links to install.
> > >>
> > >> But - note that Stock and Watson (2006), in an NBER
> > >> technical working paper
> > >>
> > >> http://www.nber.org/papers/t0323
> > >>
> > >> show that the heteroskedasticity-robust covariance
> > >> estimator is not consistent with fixed effects.  The
> > >> cluster-robust estimator is OK, though.
> > >>
> > >> HTH.
> > >>
> > >> Cheers,
> > >> Mark
> > >>
> > >> Prof. Mark Schaffer
> > >> Director, CERT
> > >> Department of Economics
> > >> School of Management & Languages
> > >> Heriot-Watt University, Edinburgh EH14 4AS
> > >> tel +44-131-451-3494 / fax +44-131-451-3296
> > >> email: [email protected]
> > >> web: http://www.sml.hw.ac.uk/ecomes
> > >>
> > >>
> > >>
> > >>> Hope this helps,
> > >>> Maarten
> > >>>
> > >>> -----------------------------------------
> > >>> Maarten L. Buis
> > >>> Department of Social Research Methodology Vrije
> > >>> Universiteit  Amsterdam Boelelaan 1081
> > >>> 1081 HV Amsterdam
> > >>> The Netherlands
> > >>>
> > >>> visiting address:
> > >>> Buitenveldertselaan 3 (Metropolitan), room Z434
> > >>>
> > >>> +31 20 5986715
> > >>>
> > >>> http://home.fsw.vu.nl/m.buis/
> > >>> -----------------------------------------
> > >>>
> > >>>
> > >>>
> > >>>
> > >>
> > __________________________________________________________
> > >>      >>> _ Want ideas for reducing your carbon
> > footprint? Visit >>> Yahoo!  For Good
> > >>>
> > http://uk.promotions.yahoo.com/forgood/environment.html
> > >>> * *   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/
> > >>
> > > *
> > > *   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/
> > >
> > >
> >
> > --
> > E. Paul Wileyto, Ph.D.
> > Assistant Professor of Biostatistics
> > Tobacco Use Research Center
> > School of Medicine, U. of Pennsylvania
> > 3535 Market Street, Suite 4100
> > Philadelphia, PA  19104-3309
> >
> > 215-746-7147
> > Fax: 215-746-7140
> > [email protected]
> > http://mail.med.upenn.edu/~epw/
> >
> > *
> > *   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/
>



-- 
Thomas Jacobs

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index