Quantcast

st: Robust vs Cluster errors using xtreg fe in Stata10

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

st: Robust vs Cluster errors using xtreg fe in Stata10

Carolina Lennon
 Dear all:

I am working with panel data (countries years) and I was running fixed
effect estimations using alternatively the robust option and cluster
option in Stata 10. To my surprise I have obtained the same standard
errors in both cases. So the question is:  is this possible? In theory
they must be different. Additionally,  I remember doing the same
exercise (though using other data set) with stata 9 and at that
moment, the SE for the alternative options were different. Maybe I am
doing something wrong!

In particular I am running the following codes:

xtreg depvar regressors year_dummies , fe   vce(cluster country)
xtreg depvar regressors year_dummies , fe   vce(robust)

where the database was previously defined as the panel:
tsset  country year, yearly

Many Thanks
Carolina

Note: the options "robust" and "cluster(country)" give the same result!

*
*   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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

st: AW: Robust vs Cluster errors using xtreg fe in Stata10

Martin Weiss-5

<>

In this example from http://www.stata-press.com/books/mus.html,
 the SEs coincide btw -robust- and -cluster- as well...


*************
use http://www.stata-press.com/data/mus/mus08psidextract.dta,/* 
 */  clear

qui{
        xtreg /*
         */ lwage exp exp2 wks ed, /*
         */ fe
        est store FE_default
       
        xtreg/*
         */  lwage exp exp2 wks ed, /*
         */ fe vce(cluster id)
        est store FE_cluster
       
        xtreg /*
         */ lwage exp exp2 wks ed, /*
         */ fe vce(robust)
         est store FE_robust
}

estimates table FE_default  /*
 */ FE_cluster FE_robust, se  
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [hidden email]
[mailto:[hidden email]] Im Auftrag von Carolina Lennon
Gesendet: Dienstag, 9. Juni 2009 09:55
An: [hidden email]
Betreff: st: Robust vs Cluster errors using xtreg fe in Stata10

 Dear all:

I am working with panel data (countries years) and I was running fixed
effect estimations using alternatively the robust option and cluster
option in Stata 10. To my surprise I have obtained the same standard
errors in both cases. So the question is:  is this possible? In theory
they must be different. Additionally,  I remember doing the same
exercise (though using other data set) with stata 9 and at that
moment, the SE for the alternative options were different. Maybe I am
doing something wrong!

In particular I am running the following codes:

xtreg depvar regressors year_dummies , fe   vce(cluster country)
xtreg depvar regressors year_dummies , fe   vce(robust)

where the database was previously defined as the panel:
tsset  country year, yearly

Many Thanks
Carolina

Note: the options "robust" and "cluster(country)" give the same result!

*
*   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/


*
*   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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: st: AW: Robust vs Cluster errors using xtreg fe in Stata10

Austin Nichols
In reply to this post by Carolina Lennon
Carolina Lennon and Martin--
-help whatsnew- and search for xtreg to see why (stock and watson ref)

On Tue, Jun 9, 2009 at 5:52 AM, Martin Weiss<[hidden email]> wrote:

>
> <>
>
> In this example from http://www.stata-press.com/books/mus.html,
>  the SEs coincide btw -robust- and -cluster- as well...
>
>
> *************
> use http://www.stata-press.com/data/mus/mus08psidextract.dta,/*
>  */  clear
>
> qui{
>        xtreg /*
>         */ lwage exp exp2 wks ed, /*
>         */ fe
>        est store FE_default
>
>        xtreg/*
>         */  lwage exp exp2 wks ed, /*
>         */ fe vce(cluster id)
>        est store FE_cluster
>
>        xtreg /*
>         */ lwage exp exp2 wks ed, /*
>         */ fe vce(robust)
>         est store FE_robust
> }
>
> estimates table FE_default  /*
>  */ FE_cluster FE_robust, se
> *************
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [hidden email]
> [mailto:[hidden email]] Im Auftrag von Carolina Lennon
> Gesendet: Dienstag, 9. Juni 2009 09:55
> An: [hidden email]
> Betreff: st: Robust vs Cluster errors using xtreg fe in Stata10
>
>  Dear all:
>
> I am working with panel data (countries years) and I was running fixed
> effect estimations using alternatively the robust option and cluster
> option in Stata 10. To my surprise I have obtained the same standard
> errors in both cases. So the question is:  is this possible? In theory
> they must be different. Additionally,  I remember doing the same
> exercise (though using other data set) with stata 9 and at that
> moment, the SE for the alternative options were different. Maybe I am
> doing something wrong!
>
> In particular I am running the following codes:
>
> xtreg depvar regressors year_dummies , fe   vce(cluster country)
> xtreg depvar regressors year_dummies , fe   vce(robust)
>
> where the database was previously defined as the panel:
> tsset  country year, yearly
>
> Many Thanks
> Carolina
>
> Note: the options "robust" and "cluster(country)" give the same result!

*
*   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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

AW: st: AW: Robust vs Cluster errors using xtreg fe in Stata10

Martin Weiss-5

<>

Ok, cheers, that explains the observation that Stata 9 gave different
results...



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [hidden email]
[mailto:[hidden email]] Im Auftrag von Austin Nichols
Gesendet: Dienstag, 9. Juni 2009 12:06
An: [hidden email]
Betreff: Re: st: AW: Robust vs Cluster errors using xtreg fe in Stata10

Carolina Lennon and Martin--
-help whatsnew- and search for xtreg to see why (stock and watson ref)

On Tue, Jun 9, 2009 at 5:52 AM, Martin Weiss<[hidden email]> wrote:

>
> <>
>
> In this example from http://www.stata-press.com/books/mus.html,
>  the SEs coincide btw -robust- and -cluster- as well...
>
>
> *************
> use http://www.stata-press.com/data/mus/mus08psidextract.dta,/*
>  */  clear
>
> qui{
>        xtreg /*
>         */ lwage exp exp2 wks ed, /*
>         */ fe
>        est store FE_default
>
>        xtreg/*
>         */  lwage exp exp2 wks ed, /*
>         */ fe vce(cluster id)
>        est store FE_cluster
>
>        xtreg /*
>         */ lwage exp exp2 wks ed, /*
>         */ fe vce(robust)
>         est store FE_robust
> }
>
> estimates table FE_default  /*
>  */ FE_cluster FE_robust, se
> *************
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [hidden email]
> [mailto:[hidden email]] Im Auftrag von Carolina
Lennon

> Gesendet: Dienstag, 9. Juni 2009 09:55
> An: [hidden email]
> Betreff: st: Robust vs Cluster errors using xtreg fe in Stata10
>
>  Dear all:
>
> I am working with panel data (countries years) and I was running fixed
> effect estimations using alternatively the robust option and cluster
> option in Stata 10. To my surprise I have obtained the same standard
> errors in both cases. So the question is:  is this possible? In theory
> they must be different. Additionally,  I remember doing the same
> exercise (though using other data set) with stata 9 and at that
> moment, the SE for the alternative options were different. Maybe I am
> doing something wrong!
>
> In particular I am running the following codes:
>
> xtreg depvar regressors year_dummies , fe   vce(cluster country)
> xtreg depvar regressors year_dummies , fe   vce(robust)
>
> where the database was previously defined as the panel:
> tsset  country year, yearly
>
> Many Thanks
> Carolina
>
> Note: the options "robust" and "cluster(country)" give the same result!

*
*   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/


*
*   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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: st: AW: Robust vs Cluster errors using xtreg fe in Stata10

Carolina Lennon
In reply to this post by Austin Nichols
Many thanks Martin and Austin!
I am new in this list and I am greatly surprised by your fast and
helpful response !

Then, what I learnt is that, differently form Stata 9, in Stata10 the
robust and cluster options are identical for the "xtreg fe"
regressions.

It seems that I need to read the article of Stock and Watson! to see
why it is always required to adjust for cluster in order to correct SE
for Heteroskedasticity in FE estimations.

Previously, I thought that sometimes it could be not advisable to
implement cluster errors but still to implement robust errors (then,
the utility of having the two options separately). For instances,
when  the number of observations were higher enough but either the
number of clusters was lower than 50 or the number of explanatory
variables exceeded the number of clusters. In any case, the response
might be in the article! then many thanks again!

Carolina

2009/6/9 Martin Weiss <[hidden email]>:

>
> <>
>
> Ok, cheers, that explains the observation that Stata 9 gave different
> results...
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [hidden email]
> [mailto:[hidden email]] Im Auftrag von Austin Nichols
> Gesendet: Dienstag, 9. Juni 2009 12:06
> An: [hidden email]
> Betreff: Re: st: AW: Robust vs Cluster errors using xtreg fe in Stata10
>
> Carolina Lennon and Martin--
> -help whatsnew- and search for xtreg to see why (stock and watson ref)
>
> On Tue, Jun 9, 2009 at 5:52 AM, Martin Weiss<[hidden email]> wrote:
>>
>> <>
>>
>> In this example from http://www.stata-press.com/books/mus.html,
>>  the SEs coincide btw -robust- and -cluster- as well...
>>
>>
>> *************
>> use http://www.stata-press.com/data/mus/mus08psidextract.dta,/*
>>  */  clear
>>
>> qui{
>>        xtreg /*
>>         */ lwage exp exp2 wks ed, /*
>>         */ fe
>>        est store FE_default
>>
>>        xtreg/*
>>         */  lwage exp exp2 wks ed, /*
>>         */ fe vce(cluster id)
>>        est store FE_cluster
>>
>>        xtreg /*
>>         */ lwage exp exp2 wks ed, /*
>>         */ fe vce(robust)
>>         est store FE_robust
>> }
>>
>> estimates table FE_default  /*
>>  */ FE_cluster FE_robust, se
>> *************
>>
>>
>>
>> HTH
>> Martin
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: [hidden email]
>> [mailto:[hidden email]] Im Auftrag von Carolina
> Lennon
>> Gesendet: Dienstag, 9. Juni 2009 09:55
>> An: [hidden email]
>> Betreff: st: Robust vs Cluster errors using xtreg fe in Stata10
>>
>>  Dear all:
>>
>> I am working with panel data (countries years) and I was running fixed
>> effect estimations using alternatively the robust option and cluster
>> option in Stata 10. To my surprise I have obtained the same standard
>> errors in both cases. So the question is:  is this possible? In theory
>> they must be different. Additionally,  I remember doing the same
>> exercise (though using other data set) with stata 9 and at that
>> moment, the SE for the alternative options were different. Maybe I am
>> doing something wrong!
>>
>> In particular I am running the following codes:
>>
>> xtreg depvar regressors year_dummies , fe   vce(cluster country)
>> xtreg depvar regressors year_dummies , fe   vce(robust)
>>
>> where the database was previously defined as the panel:
>> tsset  country year, yearly
>>
>> Many Thanks
>> Carolina
>>
>> Note: the options "robust" and "cluster(country)" give the same result!
>
> *
> *   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/
>
>
> *
> *   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/
>



--
Carolina Lennon

Mobile in France: (33) 06 35 34 04 40
Mobile in Austria:  (43) 06 76 59 24 553
Office at Wiiw in Vienna:  (43) 01 533 66 10 86
Institute website: http://www.wiiw.ac.at
Personal website: http://carolina.lennon.research.googlepages.com/

*
*   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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: st: AW: Robust vs Cluster errors using xtreg fe in Stata10

Carolina Lennon
In reply to this post by Austin Nichols
Many thanks Martin and Austin!
I am new in this list and I am greatly surprised by your fast and
helpful response !

Then, what I learnt is that, differently form Stata 9, in Stata10 the
robust and cluster options are identical for the "xtreg fe"
regressions.

It seems that I need to read the article of Stock and Watson! to see
why it is always required to adjust for cluster in order to correct SE
for Heteroskedasticity in FE estimations.

Previously, I thought that sometimes it could be not advisable to
implement cluster errors but still to implement robust errors (then,
the utility of having the two options separately). For instances,
when  the number of observations was higher enough but either the
number of clusters was lower than 50 or the number of explanatory
variables exceeded the number of clusters. In any case, the response
might be in the article! then many thanks again!

Carolina

2009/6/9 Martin Weiss <[hidden email]>:

>
> <>
>
> Ok, cheers, that explains the observation that Stata 9 gave different
> results...
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [hidden email]
> [mailto:[hidden email]] Im Auftrag von Austin Nichols
> Gesendet: Dienstag, 9. Juni 2009 12:06
> An: [hidden email]
> Betreff: Re: st: AW: Robust vs Cluster errors using xtreg fe in Stata10
>
> Carolina Lennon and Martin--
> -help whatsnew- and search for xtreg to see why (stock and watson ref)
>
> On Tue, Jun 9, 2009 at 5:52 AM, Martin Weiss<[hidden email]> wrote:
>>
>> <>
>>
>> In this example from http://www.stata-press.com/books/mus.html,
>>  the SEs coincide btw -robust- and -cluster- as well...
>>
>>
>> *************
>> use http://www.stata-press.com/data/mus/mus08psidextract.dta,/*
>>  */  clear
>>
>> qui{
>>        xtreg /*
>>         */ lwage exp exp2 wks ed, /*
>>         */ fe
>>        est store FE_default
>>
>>        xtreg/*
>>         */  lwage exp exp2 wks ed, /*
>>         */ fe vce(cluster id)
>>        est store FE_cluster
>>
>>        xtreg /*
>>         */ lwage exp exp2 wks ed, /*
>>         */ fe vce(robust)
>>         est store FE_robust
>> }
>>
>> estimates table FE_default  /*
>>  */ FE_cluster FE_robust, se
>> *************
>>
>>
>>
>> HTH
>> Martin
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: [hidden email]
>> [mailto:[hidden email]] Im Auftrag von Carolina
> Lennon
>> Gesendet: Dienstag, 9. Juni 2009 09:55
>> An: [hidden email]
>> Betreff: st: Robust vs Cluster errors using xtreg fe in Stata10
>>
>>  Dear all:
>>
>> I am working with panel data (countries years) and I was running fixed
>> effect estimations using alternatively the robust option and cluster
>> option in Stata 10. To my surprise I have obtained the same standard
>> errors in both cases. So the question is:  is this possible? In theory
>> they must be different. Additionally,  I remember doing the same
>> exercise (though using other data set) with stata 9 and at that
>> moment, the SE for the alternative options were different. Maybe I am
>> doing something wrong!
>>
>> In particular I am running the following codes:
>>
>> xtreg depvar regressors year_dummies , fe   vce(cluster country)
>> xtreg depvar regressors year_dummies , fe   vce(robust)
>>
>> where the database was previously defined as the panel:
>> tsset  country year, yearly
>>
>> Many Thanks
>> Carolina
>>
>> Note: the options "robust" and "cluster(country)" give the same result!
>
> *
> *   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/
>
>
> *
> *   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/
>



--
Carolina Lennon

Mobile in France: (33) 06 35 34 04 40
Mobile in Austria:  (43) 06 76 59 24 553
Office at Wiiw in Vienna:  (43) 01 533 66 10 86
Institute website: http://www.wiiw.ac.at
Personal website: http://carolina.lennon.research.googlepages.com/

*
*   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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: st: AW: Robust vs Cluster errors using xtreg fe in Stata10

Stas Kolenikov
On 6/9/09, Carolina Lennon <[hidden email]> wrote:
>  Previously, I thought that sometimes it could be not advisable to
>  implement cluster errors but still to implement robust errors (then,
>  the utility of having the two options separately). For instances,
>  when  the number of observations was higher enough but either the
>  number of clusters was lower than 50 or the number of explanatory
>  variables exceeded the number of clusters. In any case, the response
>  might be in the article! then many thanks again!

That's cheating on degrees of freedom. With few clusters, the
-vce(cluster)- variance estimator will be unstable -- in any case, the
asymptotics of both point estimates and the standard errors is that
the number of clusters goes to infinity. You would get standard errors
that are anti-conservative, although I don't think I've seen any proof
(analytical or by simulation) that they are inconsistent. I am sure
you can find situations where they are though.

The qualitative explanation that I can offer is that -robust- assumes
the data are independent, but when we are in the panel data world, we
know we are not. The contributions to the statistical model come from
a panel as a whole -- this is the case with the likelihood with
-xtreg, mle- for instance, and this is the case with -vce(cluster)-.

--
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.
*
*   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/
Loading...