Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[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" <>
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–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index