Skip to content

zelig package: robust SE

2 messages · T.Riedle, Achim Zeileis

#
Dear R users,

I am trying to run a logistic regression using zelig. The simple logistic regression works well but now I want to have HAC robust standard errors. I have read in the manual that there is an option called "robust" and that zelig() computes robust SE via the sandwich package. However, it doesn't work. My code looks as follows:


crisis_bubble4<-zelig(stock.market.crash~crash.MA+bubble.MA+MP.MA<http://mp.ma/>+UTS.MA<http://uts.ma/>+UPR.MA<http://upr.ma/>+PPI.MA<http://ppi.ma/>+RV.MA<http://rv.ma/>,robust=TRUE,model="logit",data=Data_logitregression_movingaverage)

Error in glm.control(robust = TRUE) : unused argument (robust = TRUE)



I took this code from the zelig manual and don't understand why I get an error. What is more, I want to calculate NeweyWest SE or the SE using the weights by Andrews via the kernHAC function. How can I do that?

Thanks for your support.

Kind regards
#
On Sun, 29 May 2016, T.Riedle wrote:

            
Possibly this changed in recent versions of "Zelig". The documentation 
for relogit on the official Zelig web page shows the same error:
http://docs.zeligproject.org/en/latest/zelig-relogit.html#example-2-one-tau-with-weighting-robust-standard-errors-and-bias-correction

In any case, Zelig only interfaced the so-called "robust" standard errors 
(sandwich or HC0) and not the ones with HAC correction.
Why do you want to use Zelig? Apparently, the solution using plain glm() 
along with the sandwich package and coeftest() did work for you. And in my 
other e-mail I showed you how you can use lrm().