[R] different results aov vs. lm

Prof Brian Ripley ripley at stats.ox.ac.uk
Fri Sep 30 12:33:29 CEST 2011


On Fri, 30 Sep 2011, Martin Batholdy wrote:

> Hi,
>
>
> I currently running regression models on an experimental dataset. 
> The model contains one independent continuous variable and two 
> independent experimental conditions (one with two factors, the other 
> with three factors) and several covariates.
>
> Now I get different results for a covariate in this model when I run
> aov(modell) vs. lm(modell).
>
> In the ancova model, one of the covariates seems to explain a 
> significant amount of variance. But in the lm-statistics this 
> variable doesn't exceed the p-threshold of p = 0.05.
>
> How can that be?

Apples and oranges?  You haven't given us any reproducible code, but I 
believe the what you looked at for lm (which does not of itself give 
p-values) was equivalent to using drop1, whereas aov gives a 
sequential ANOVA table.

I suspect the problem is a lack of statistical understanding, so this 
question might better be asked (with an example) of your local 
statistical advisor.

> thanks for any advice on this!
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list