# Difference between anova(car) and ezANOVA

I am trying to interpret results form two-way ANOVA on the data presented in the figure below. i implemented the ezANOVA following this explanation. However, when I use the anova function in the car library (with contrasts) I get different results. How would I interpret this?

ezANOVA

ezANOVA(data = data_stats,
wid = Subjectnr,
within = .(amplitude, condition),
dv = parameterValue,
type=1)

$ANOVA Effect DFn DFd F p p<.05 ges 1 amplitude 3 102 277.088523 7.130711e-49 * 0.78837902 2 condition 2 68 6.432535 2.763313e-03 * 0.07703073 3 amplitude:condition 6 204 6.366602 3.682453e-06 * 0.01869426  Looking at the figure, this is something I don't trust. H,V and P are the 'conditions' that I have, the colours indicate the amplitude. Condition can't be so significant, can it? ANOVA (car) When I try the anova function of the car package I get completely different results: ## Set Contrasts for condition V_v_P <- c(0, 1, -1) VP_v_H <- c(2, -1, -1) contrasts(data_stats$condition)<-cbind(V_v_P, VP_v_H )

library(car)
model = lm(parameterValue ~ amplitude * condition|Subjectnr,
data=data_stats)

anova(model)


with output:

Analysis of Variance Table

Response: parameterValue
Df  Sum Sq Mean Sq F value Pr(>F)
amplitude             3  9.8184  3.2728 55.2770 <2e-16 ***
condition             2  0.2200  0.1100  1.8575 0.1574
amplitude:condition   6  0.0502  0.0084  0.1413 0.9906
Residuals           408 24.1565  0.0592
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

> summary(model)

Call:
lm(formula = parameterValue ~ amplitude * condition, data = data_stats)

Residuals:
Min       1Q   Median       3Q      Max
-0.69648 -0.17334 -0.01336  0.15013  0.66999

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept)                  2.19086    0.02375  92.262  < 2e-16 ***
amplitude6                  -0.07428    0.03358  -2.212   0.0275 *
amplitude13                 -0.26795    0.03358  -7.979 1.51e-14 ***
amplitude18                 -0.38545    0.03358 -11.478  < 2e-16 ***
conditionV_v_P              -0.03385    0.02908  -1.164   0.2452
conditionVP_v_H              0.02151    0.01679   1.281   0.2010
amplitude6:conditionV_v_P    0.01724    0.04113   0.419   0.6753
amplitude13:conditionV_v_P   0.02170    0.04113   0.527   0.5981
amplitude18:conditionV_v_P   0.02600    0.04113   0.632   0.5277
amplitude6:conditionVP_v_H  -0.01102    0.02375  -0.464   0.6428
amplitude13:conditionVP_v_H -0.01331    0.02375  -0.561   0.5754
amplitude18:conditionVP_v_H -0.01135    0.02375  -0.478   0.6329
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2433 on 408 degrees of freedom
Multiple R-squared:  0.2946,    Adjusted R-squared:  0.2756
F-statistic: 15.49 on 11 and 408 DF,  p-value: < 2.2e-16 