Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Replicating Stata's xtreg clustered SEs in R

From   "David A. Kim" <[email protected]>
To   [email protected]
Subject   st: Replicating Stata's xtreg clustered SEs in R
Date   Mon, 12 Mar 2012 00:45:06 -0400

I'm trying to replicate a time-series cross-sectional analysis
(countries over years) with SEs clustered by country.  The original
analysis was done in Stata 10 with: xtreg [DV] [IVs] fe

Using plm() in R (,
I've replicated the coefficients. I sought to estimate
country-clustered SEs with vcovHC(), and tried a variety of options,
but couldn't exactly replicate the published (i.e., Stata 10's) SEs.
In R, vcovHC(x, method="arellano", type="HC1", cluster="group") came
closest to Stata's SEs (differing at the 3rd decimal place or so).

Does anyone happen to know what method cluster() for Stata's xtreg
uses to calculate clustered SEs for panel data, and/or how this could
be implemented equivalently in R?  Any help would be much appreciated.

Thanks in advance,


*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index