From 02d448d61ca7af17dd12270698988882a392524a Mon Sep 17 00:00:00 2001
From: jkeuskamp <j.a.keuskamp@uu.nl>
Date: Wed, 1 Aug 2018 16:49:28 +0200
Subject: [PATCH] Update Anova.R

In cases where test.statistic was provided to Anova when used on a lm class model, an error was thrown as test.statistic is provided twice. This is now solved
---
 R/Anova.R | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/R/Anova.R b/R/Anova.R
index 66a9a9a..0937165 100644
--- a/R/Anova.R
+++ b/R/Anova.R
@@ -116,7 +116,7 @@ Anova.lm <- function(mod, error, type=c("II","III", 2, 3),
   }
   if (any(is.na(coef(mod))) && singular.ok){
     message("Note: model has aliased coefficients\n      sums of squares computed by model comparison")
-    result <- Anova(lm2glm(mod), type=type, singular.ok=TRUE, test.statistic="F", ...)
+    result <- Anova(lm2glm(mod), type=type, singular.ok=TRUE, ...)
     heading <- attributes(result)$heading
     if (type == "2") type <- "II"
     if (type == "3") type <- "III"
@@ -125,10 +125,10 @@ Anova.lm <- function(mod, error, type=c("II","III", 2, 3),
   }
   if (white.adjust != "FALSE"){
     if (white.adjust == "TRUE") white.adjust <- "hc3" 
-    return(Anova.default(mod, type=type, vcov.=hccm(mod, type=white.adjust), test.statistic="F", 
+    return(Anova.default(mod, type=type, vcov.=hccm(mod, type=white.adjust), 
                          singular.ok=singular.ok, ...))
   }
-  else if (!is.null(vcov.)) return(Anova.default(mod, type=type, vcov.=vcov., test.statistic="F", 
+  else if (!is.null(vcov.)) return(Anova.default(mod, type=type, vcov.=vcov., 
                                                  singular.ok=singular.ok, ...))
   switch(type,
          II=Anova.II.lm(mod, error, singular.ok=singular.ok, ...),