[R] sandwich package: HAC estimators

Achim Zeileis Achim.Zeileis at uibk.ac.at
Tue May 31 09:36:02 CEST 2016

On Mon, 30 May 2016, Leonardo Ferreira Fontenelle wrote:

> Em Sáb 28 mai. 2016, às 15:50, Achim Zeileis escreveu:
>> On Sat, 28 May 2016, T.Riedle wrote:
>> > I thought it would be useful to incorporate the HAC consistent 
>> > covariance matrix into the logistic regression directly and generate an 
>> > output of coefficients and the corresponding standard errors. Is there 
>> > such a function in R?
>> Not with HAC standard errors, I think.
> Don't glmrob() and summary.glmrob(), from robustbase, do that?

No, they implement a different concept of robustness. See also

glmrob() implements GLMs that are "robust" or rather "resistant" to 
outliers and other observations that do not come from the main model 
equation. Instead of maximum likelihood (ML) estimation other estimation 
techniques (along with corresponding covariances/standard errors) are 

In contrast, the OP asked for HAC standard errors. The motivation for 
these is that the main model equation does hold for all observations but 
that the observations might be heteroskedastic and/or autocorrelated. In 
this situation, ML estimation is still consistent (albeit not efficient) 
but the covariance matrix estimate needs to be adjusted.

> Leonardo Ferreira Fontenelle, MD, MPH
> ______________________________________________
> R-help at 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.

More information about the R-help mailing list