Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: [xtreg fe] [regress] clustered standard errors differ
From
Ryan Kessler <[email protected]>
To
[email protected]
Subject
Re: st: [xtreg fe] [regress] clustered standard errors differ
Date
Sat, 30 Mar 2013 18:10:43 -0400
Your musing is spot on --- the discrepancy is due to a degrees of
freedom adjustment. But this isn't a bug.
webuse nlswork, clear
keep if _n <= 100
xtset idcode year
reg ln_w age i.idcode, vce(cluster idcode)
xtreg ln_w age, fe vce(cluster idcode)
xtreg ln_w age, fe vce(cluster idcode) dfadj
Mark Schaffer explains here -->
http://www.stata.com/statalist/archive/2009-03/msg00335.html.
Ryan Kessler
On Fri, Mar 29, 2013 at 10:51 PM, Marder, Andrew <[email protected]> wrote:
> Dear Stata List,
>
> I have found that calculating clustered standard errors using "xtreg fe" does not match those from "regress". Here is some sample code to recreate this discrepancy:
>
> webuse nlswork, clear
> keep if _n <= 100
>
> regress ln_w age tenure i.idcode, vce(cluster idcode)
>
> xtset idcode
> xtreg ln_w age tenure, fe vce(cluster idcode)
>
> I have written some thoughts on what might be happening here: http://amarder.github.com/2013/03/29/clustered-standard-errors.html
>
> Is this a bug in Stata or am I doing something silly?
>
> Thanks for the help, Andrew
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/