Hi everyone,
I'm getting the same problem as Rod. The options "robust =TRUE" and
"robust
= FALSE" lead to the same sd errors estimates.
I use R 3.01 and Zelig 4.2-0.
Is there any fix for it yet?
best,
Rogério J. Barbosa
On Wed, Jun 5, 2013 at 12:21 PM, Rod Alence <Rod.Alence(a)wits.ac.za> wrote:
Hi,
It doesn't seem like "robust=TRUE" is working for linear regression (ls).
The standard errors are coming out exactly the same as with "robust=FALSE".
I am on R 3.0.0 and Zelig 4.1-3 (and have tried on Linux and Windows).
Has anyone else had this problem?
Here's a reproducible example:
## "Robust" estimation not working
require(Zelig)
df <- data.frame(y=c(rnorm(n=100, mean=0, sd=1), rnorm(n=100, mean=10,
sd=10)),
x=c(rep(1, 100), rep(2,100)))
z.robustT <- zelig(y ~ x, data=df, model="ls", robust=TRUE)
z.robustF <- zelig(y ~ x, data=df, model="ls", robust=FALSE)
# Standard errors are the same:
summary(z.robustT)
summary(z.robustF)
## Alternative
require(sandwich)
require(lmtest)
lm.robustF <- lm(y ~ x, data=df)
summary(lm.robustF) #matches z.robustF
vcovMat <- vcovHC(lm.robustF)
lm.robustT <- coeftest(lm.robustF, vcov.=vcovMat)
lm.robustT #same coef, different se
##########
Rod
<table width="100%" border="0" cellspacing="0"
cellpadding="0"
style="width:100%;">
<tr>
<td align="left" style="text-align:justify;"><font
face="arial,sans-serif"
size="1" color="#999999"><span
style="font-size:11px;">This communication
is intended for the addressee only. It is confidential. If you have
received this communication in error, please notify us immediately and
destroy the original message. You may not copy or disseminate this
communication without the permission of the University. Only authorised
signatories are competent to enter into agreements on behalf of the
University and recipients are thus advised that the content of this message
may not be legally binding on the University and may contain the personal
views and opinions of the author, which are not necessarily the views and
opinions of The University of the Witwatersrand, Johannesburg. All
agreements between the University and outsiders are subject to South
African Law unless the University agrees in writing to the contrary.
</span></font></td>
</tr>
</table
-
--
Zelig Mailing List, served by HUIT
Send messages: zelig(a)lists.gking.harvard.edu
[un]subscribe Options:
http://lists.gking.harvard.edu/mailman/listinfo/zelig
Zelig program information:
http://gking.harvard.edu/zelig/
Zelig mailing list
Zelig(a)lists.gking.harvard.edu
To unsubscribe from this list or get other information:
https://lists.gking.harvard.edu/mailman/listinfo/zelig