[R] fixed effects with clustered standard errors

cariboupad at gmx.fr cariboupad at gmx.fr
Tue Feb 7 15:35:07 CET 2012


Dear R-helpers,

I have a very simple question and I really hope that someone could help me

I would like to estimate a simple fixed effect regression model with clustered standard errors by individuals.
For those using Stata, the counterpart would be xtreg with the "fe" option, or areg with the "absorb" option and in both case the clustering is achieved with "vce(cluster id)"

My question is : how could I do that with R ? An important point is that I have too many individuals, therefore I cannot include dummies and should use the demeaning "usual" procedure.
I tried with the plm package with the "within" option, but R quikcly tells me that the memory limits are attained (I have over 10go ram!) while the dataset is only 700mo (about 50 000 individuals, highly unbalanced)
I dont understand... plm do indeed demean the data so the computation should be fast and light enough... ?!

Are there any other solutions ?
Many thanks in advance ! ;)
John

 



More information about the R-help mailing list