6001,1,"Open",3,300245,"Gregory Warnes",100,"Nobody","2014-12-05 01:08","","2014-12-05 01:08","anova.lmRobList generates incorrect results for more than two models","> df <- data.frame(matrix(rnorm(1000), ncol=4))
> fit.1 <- lmrob(X1 ~ X2 + X3 + X4, data=df)
> fit.2 <- lmrob(X1 ~ X2 + X3, data=df)
> fit.3 <- lmrob(X1 ~ X3, data=df)
> fit.4 <- lmrob(X1 ~ 1, data=df)
> anova(fit.1, fit.2) # works correctly
Robust Wald Test Table
Model 1: X1 ~ X2 + X3 + X4
Model 2: X1 ~ X2 + X3
Largest model fitted by lmrob(), i.e. SM
pseudoDf Test.Stat Df Pr(>chisq)
1 246
2 247 1.8732 1 0.1711
> anova(fit.1, fit.2, fit.3, fit.4) # returns the same data on rows 2, 3 and 4
comparisons
Robust Wald Test Table
Model 1: X1 ~ X2 + X3 + X4
Model 2: X1 ~ X2 + X3
Model 3: X1 ~ X3
Model 4: X1 ~ 1
Largest model fitted by lmrob(), i.e. SM
pseudoDf Test.Stat Df Pr(>chisq)
1 246
2 247 1.8732 1 0.1711
3 247 1.8732 1 0.1711
4 247 1.8732 1 0.1711
> packageVersion(""robustbase"")
[1] ‘0.92.2’
> R.version.string
[1] ""R version 3.1.2 (2014-10-31)""
",,,,"All","None","All","None","None","critical","None",""
6471,1,"Open",3,302793,"Ben Hansen",100,"Nobody","2016-10-05 21:05","","2016-10-07 02:24","`.vcov.avar1` expects something a little different from what `lmrob.S` provides","`.vcov.avar1` computes sandwich estimates of covariance. The entry on the diagonal of the bread matrix corresponding to the scale parameter is now being estimated by
```
mean(w0^2 - bb^2)
```
(In the terms of Croux, Dhaene and Hoorelbeke [2004], this is the estimate of the lower-right entry in 3.7's $\Omega_{MM}$.)
The use of this expression to estimate that matrix entry presumes the mean of `w0` to be `bb`. (Or perhaps that `w0` is a realization of a random variable with expectation `bb`.) However, `lmrob.S` arranges that `sum(w0)/(n-p) = bb`, not that `mean(w0) = bb`, as I learned from Matias Salibian Barrera on this discussion thread: https://github.com/msalibian/Fast-S/issues/1.
There are some simple examples on that thread also.
The problem seems likely to undercut `vcov.avar1`'s performance in small samples; it may also explain some failures of positive-definiteness. It shouldn't be difficult to correct; the trickiest part may be deciding whether `.vcov.avar1` should mimic `lmrob.S`'s approach to degrees of freedom or continue taking simple means, but with an updated centering point. An intermediate to these alternatives would be to replace `mean(w0^2 - bb^2)` with `var(w0)`. ",,,,"None","None","All","None","None","None","None",""