9
$\begingroup$

What is the difference between Anova(data)and anova(data)?

> anova(res.full)
Analysis of Variance Table

Response: Sales
                     Df Sum Sq Mean Sq   F value    Pr(>F)    
Promotional.Accounts  1   1070    1070   35.0800 0.0001465 ***
Active.Accounts       1  44337   44337 1453.2067 3.680e-12 ***
Competing.Brands      1  43331   43331 1420.2314 4.124e-12 ***
Potential             1     16      16    0.5146 0.4895772    
Residuals            10    305      31                        
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> Anova(res.full)
Anova Table (Type II tests)

Response: Sales
                     Sum Sq Df   F value    Pr(>F)    
Promotional.Accounts    275  1    9.0193   0.01327 *  
Active.Accounts       27371  1  897.1238 4.025e-11 ***
Competing.Brands      42877  1 1405.3398 4.346e-12 ***
Potential                16  1    0.5146   0.48958    
Residuals               305 10                        
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 

I don't understand why in each table the F statistic for each factor is different.

$\endgroup$
3
  • 4
    $\begingroup$ Welcome to StackOverflow! Please supply a reproducible example that includes example data and complete code that includes the package(s) you're using (in this case, where the Anova function is coming from). $\endgroup$
    – Thomas
    Apr 4, 2015 at 12:13
  • 2
    $\begingroup$ There is something conceptual that I don't understand, no need to add data because I don't have an error or something like that. $\endgroup$
    – Michael Kozak
    Apr 4, 2015 at 12:32
  • 1
    $\begingroup$ Here is an informative and easy to understand discussion on Type I, II and even III tests. Unbalanced Factorial Designs $\endgroup$
    – anil
    Oct 12, 2019 at 13:16

1 Answer 1

15
$\begingroup$

anova is a function in base R. Anova is a function in the car package.

The former calculates type I tests, that is, each variable is added in sequential order. The latter calculates type II or III tests. Type II tests test each variable after all the others. For details, see ?Anova.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.