It depends on what you mean by "robust." Robust to what? I recommend looking at the sandwich package which gives heteroskedasticity and autocorrelation robust variance/covariance matrices. For instance, you could do the following to get your OLS estimates with heteroskedasticity consistent SEs
library(sandwich) library(lmtest) reg=lm(fsn~lctot) coeftest(reg, vcov=vcovHC(reg)) Or to get cluster robust SEs, check out this: people.su.se/~ma/ clustering.pdf Hope that helps. Andrew Miles On Jan 1, 2011, at 10:09 AM, Charlène Cosandier wrote: > Hi, > > I have ove the robust standard error of an estimator but I don't > know how to > do this. > The code for my regression is the following: > reg<-lm(fsn~lctot) > But then what do I need to do? > > -- > Charlène Lisa Cosandier > > [[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. [[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.