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 cluster(country).
Using plm() in R (cran.r-project.org/web/packages/plm/index.html), 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. Many thanks in advance, David ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.