Hi Ignacio, 

following this link: 
http://www.ne.su.se/polopoly_fs/1.216115.1426234213!/menu/standard/file/clustering1.pdf
 you can download a documentation for Arai's cl-function that is mentioned in 
the link in your email. I used it several times and it works quite well. Just 
copy the function into your script and call it after you calculated your 
regression using the following command: 
cl(data, regression-model, cluster-variable) 

Best 
Jen 



-----Ursprüngliche Nachricht-----
Von: R-help [mailto:r-help-boun...@r-project.org] Im Auftrag von Achim Zeileis
Gesendet: Montag, 16. November 2015 18:48
An: Ignacio Martinez <ignaci...@gmail.com>
Cc: r-help <r-help@r-project.org>
Betreff: Re: [R] Clustered Standard Errors?

On Mon, 16 Nov 2015, Ignacio Martinez wrote:

> Hi,
>
> I found this
> <https://thetarzan.wordpress.com/2011/06/11/clustered-standard-errors-
> in-r/>
> post
> from 2011 for doing clustered standard errors in R.
>
> Is there any update to the lm package that allows to do this without 
> having to write your own function? In STATA is as simple as adding 
> cluster to the reg command.

For "lm" objects, the easiest solution is to use the "multiwayvcov" 
package on CRAN.

Additionally, the "plm" package on CRAN offers further options beyond the 
simple clustered standard errors.

> Thanks a lot for the help!
>
> Ignacio
>
>       [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 
> 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.
>

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 
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.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to