[R-sig-ME] Different lm and aov summary
Ista Zahn
izahn at psych.rochester.edu
Wed Feb 23 14:43:41 CET 2011
summary.aov should be used with aov models, not lm models. I'm not
actually sure if that is the cause of the discrepancy, but I would
start by using the appropriate methods and see if that clears things
up.
Best,
Ista
On Wed, Feb 23, 2011 at 1:38 PM, Szymek Drobniak <geralttee at gmail.com> wrote:
> Dear mixed modellers,
>
> I'm a bit confused and that's why I'm asking. I came across with sthng
> similar on the listbut couldn't actually fimd the answer there... But to the
> point - there's a model with several fixed effects, some of them with 2
> levels (eg. Age). When I look at the regression-like output there seems to
> be no age-relared effect - and in the aov table (summary.aov() or anova())
> this effect is significant. Are these two tests fundamentally different and
> if so - which one givesthe right answer? Below you'll find both outputs
>
>> Lmount1 <- lm(Lmount~age*status*morph, data=age)
>> summary(Lmount1)
>
> Call:
> lm(formula = Lmount ~ age * status * morph, data = age)
>
> Residuals:
> Min 1Q Median 3Q Max
> -3337.0 -868.6 -137.1 708.8 6910.0
>
> Coefficients:
> Estimate Std. Error t value Pr(>|t|)
> (Intercept) 2651.16 313.49 8.457 1.53e-13 ***
> ageY -659.13 414.71 -1.589 0.1149
> status1 -182.41 224.42 -0.813 0.4181
> status2 650.43 379.11 1.716 0.0891 .
> morphS -96.31 384.30 -0.251 0.8026
> ageY:status1 -216.24 301.50 -0.717 0.4748
> ageY:status2 -451.82 493.18 -0.916 0.3617
> ageY:morphS -295.03 527.77 -0.559 0.5773
> status1:morphS -248.81 279.64 -0.890 0.3756
> status2:morphS -620.20 456.58 -1.358 0.1772
> ageY:status1:morphS 525.32 385.36 1.363 0.1757
> ageY:status2:morphS 324.96 624.60 0.520 0.6040
> ---
> Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
>
> Residual standard error: 1363 on 107 degrees of freedom
> (30 observations deleted due to missingness)
> Multiple R-squared: 0.2042, Adjusted R-squared: 0.1223
> F-statistic: 2.495 on 11 and 107 DF, p-value: 0.007876
>
>> summary.aov(Lmount1)
> Df Sum Sq Mean Sq F value Pr(>F)
> age 1 20619061 20619061 11.1010 0.001185 **
> status 2 19083130 9541565 5.1370 0.007408 **
> morph 1 1503500 1503500 0.8095 0.370299
> age:status 2 1480585 740293 0.3986 0.672276
> age:morph 1 741135 741135 0.3990 0.528945
> status:morph 2 3407887 1703943 0.9174 0.402684
> age:status:morph 2 4148964 2074482 1.1169 0.331087
> Residuals 107 198742119 1857403
> ---
> Signif. codes: 0 �***� 0.001 �**� 0.01 �*� 0.05 �.� 0.1 � � 1
> 30 observations deleted due to missingness
>
> Cheers,
> Sz.
>
> [[alternative HTML version deleted]]
>
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
--
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org
More information about the R-sig-mixed-models
mailing list