[R] Huber-white cluster s.e. after optim?
Peter Muhlberger
peter.muhlberger at gmail.com
Thu Apr 10 07:36:57 CEST 2008
Hi Bill: Thanks for the reply! As you've no doubt guessed, I'm not a
statistician (I'm a social scientist). I hadn't given thought to
modeling the cluster-based covariance explicitly--interesting
possibility. My responses are drawn from some 60 discussion groups,
and a critic of my current results might complain that there could be
error covariation within group (though I suspect there probably
isn't). In Stata, the ml routine has a 'cluster' option that
generates Huber-White cluster standard errors for max. likelihood
estimates. I was hoping something similar would be possible in R. I
suppose another solution would involve specifically modeling error
covariance in optim, but it would be helpful if there was some example
of how to do this that I could examine.
Another, related problem I face is correcting for clustering in a
system of equations, estimated with systemfit using the OLS option (I
need to simultaneous estimation for subsequent hypothesis testing;
would be using SUR but for the cluster issue). It seems that both
this problem and my optim problem might be solved if there was
something in R like a vcovHC that could handle clustered data--but
that's just a non-statistician's guess.
Peter
More information about the R-help
mailing list