Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

[R] Clustered standard errors in a panel

Thomas Davidoff

2005-07-20

Replies:

I want to do the following:

glm(y ~ x1 + x2 +...)
within a panel. Hence y, x1, and x2 all vary at the individual
level. However, there is likely correlation of these variables
within an individual, so standard errors need adjustment.
I do not want to estimate fixed effects, but do want to cluster
standard errors at the individual level.
Is there an automated way to do this? Nothing in the cluster
documentation makes it clear that there is.

(An alternative is to do this by hand. In that case, I would need to
be able to calculate weighted sums of x1 and x2... at the individual
level. I can do this at the variable level [with lapply,split and
unsplit], but would love to be able to do so over the matrix of x's.  
Of course, doing by hand is less easy than an automated solution if
it exists.)


Thomas Davidoff
Assistant Professor
Haas School of Business
UC Berkeley
Berkeley, CA 94720
phone:   (510) 643-1425
fax:     (510) 643-7357
davidoff@(protected)
http://faculty.haas.berkeley.edu/davidoff


 [[alternative HTML version deleted]]

______________________________________________
R-help@(protected)
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
©2008 r-help.com - Jax Systems, LLC, U.S.A.