[R] Robust SE & Heteroskedasticity-consistent estimation

Achim Zeileis Achim.Zeileis at uibk.ac.at
Tue May 11 00:52:51 CEST 2010


On Mon, 10 May 2010, RATIARISON Eric wrote:

> Hi,
>
> I'm using maxlik with functions specified (L, his gradient & hessian).
>
> Now I would like determine some robust standard errors of my estimators.
>
> So I 'm try to use vcovHC, or hccm or robcov for example
>
> but in use one of them with my result of maxlik, I've a the following
> error message :
>
> Erreur dans terms.default(object) : no terms component
>
> Is there some attributes to give to maxlik objet for "fitting" the call
> of vcovHC?

This is discussed in
   vignette("sandwich-OOP", package = "sandwich")
one of the vignettes accompanying the "sandwich" package that provides the 
vcovHC() function. At the very least, you need an estfun() method which 
extracts the gradient contributions per observation. Then you need a 
bread() function, typically based on the observed Hessian. Then you can 
compute the basic sandwich() estimators.

Best,
Z

>
>
> Thank you
>
>
>
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
>



More information about the R-help mailing list