SCM

[#6001] anova.lmRobList generates incorrect results for more than two models

Date:
2014-12-05 01:08
Priority:
3
State:
Open
Submitted by:
Gregory Warnes (warnes)
Assigned to:
Nobody (None)
Hardware:
All
Product:
None
Operating System:
All
Component:
None
Version:
None
Severity:
critical
Resolution:
None
URL:
Summary:
anova.lmRobList generates incorrect results for more than two models

Detailed description
> 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)"

Comments:

No Comments Have Been Posted

Attached Files:

Changes

No Changes Have Been Made to This Item

Thanks to:
Vienna University of Economics and Business Powered By FusionForge