Zelig icon indicating copy to clipboard operation
Zelig copied to clipboard

Clustered standard errors for OLS models do not work

Open matthewbondy opened this issue 3 years ago • 0 comments

Hello,

I output several imputed panel data sets using Amelia and am trying to run an OLS regression using time and unit fixed effects, with clustered standard errors. I get the following warning message:

Warning messages:
1: In lm.wfit(x, y, w, offset = offset, singular.ok = singular.ok, 
    ...) :
 extra arguments ‘robust’, ‘cluster’ will be disregarded 

I'm not sure this warning has anything to do with using Amelia data because I get a similar warning when doing a simple test. When I run this:

library(Zelig)
data(bivariate)
m_noCluster <- zelig(formula=y1 ~ x1, data=bivariate, model="logit", cite=FALSE)
m_cluster <- zelig(formula=y1 ~ x1, data=bivariate, robust=TRUE, cluster="x4", model="logit", cite=FALSE)

I get this error:

Error in glm.control(robust = TRUE, cluster = "x4") : 
  unused arguments (robust = TRUE, cluster = "x4")

Thanks, Matt

matthewbondy avatar Apr 29 '22 22:04 matthewbondy