Re: [R] Clustered Standard Errors?

2015-11-17 Thread Lorenz, Jennifer
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.


Re: [R] Clustered Standard Errors?

2015-11-16 Thread David L Carlson
Updates to lm() would be documented in the manual page for the function. 
Reading the link it appears that you do not have to write your own function, 
Mahmood Ara in Stockholm University has already done it for you. You just have 
to learn how to copy a function from a web site and paste it into an R script 
file. Given the cost of a single business license for STATA in the US for 
moderate-sized datasets of $1,195 (perpetual) versus the cost of R, $0 
(perpetual), it would seem to be worth the bother.

-
David L Carlson
Department of Anthropology
Texas A University
College Station, TX 77840-4352


-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Ignacio Martinez
Sent: Monday, November 16, 2015 9:28 AM
To: r-help
Subject: [R] Clustered Standard Errors?

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.

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] Clustered Standard Errors?

2015-11-16 Thread Ignacio Martinez
Hi,

I found this

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.

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.


Re: [R] Clustered Standard Errors?

2015-11-16 Thread Achim Zeileis

On Mon, 16 Nov 2015, Ignacio Martinez wrote:


Hi,

I found this

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] Clustered standard errors in Relogit (Zelig)

2012-08-22 Thread Katrine
How do I apply clustered standard errors (by country) when using relogit
in Zelig? I can not find a function covering this.

[[alternative HTML version deleted]]

__
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.