# [R] Rsquared for anova

From: Dorien Herremans <dorien.herremans_at_ua.ac.be>
Date: Mon, 18 Apr 2011 14:37:12 +0200

Even if I use lm(), I get the following output:

> summary(fit)

```             Df  Sum Sq Mean Sq F value    Pr(>F)
nh1            1   324.0  323.99  139.13 < 2.2e-16 ***
nh2            1   723.1  723.12  310.53 < 2.2e-16 ***
nh3            1  1794.2 1794.21  770.49 < 2.2e-16 ***
```
Residuals   4604 10721.2    2.33
```---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’

no R squared to be found.

The lm() output gives this:

> summary(fit)
Df  Sum Sq Mean Sq F value    Pr(>F)
nh1            1   324.0  323.99  139.13 < 2.2e-16 ***
nh2            1   723.1  723.12  310.53 < 2.2e-16 ***
nh3            1  1794.2 1794.21  770.49 < 2.2e-16 ***
Residuals   4604 10721.2    2.33
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’

I just want to see how wel the model fits...

Another strange thing. I did the same calculations in SPSS and got
different results, among others, higher p values. lm() and aov() just
do linear regressions (anova) right? I tried with the same factorial
variables (without interaction effects to test).

Thanks!

On 15 April 2011 18:07, Dieter Menne <dieter.menne_at_menne-biomed.de> wrote:

>
> dorien wrote:

>>
>> I calculate an anova test in the following way:
>>
>> ... aov example
>>
>> I want to check the fit of the model with Rsquared
>>
>
>
> Dieter
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Rsquared-for-anova-tp3452399p3452434.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> and provide commented, minimal, self-contained, reproducible code.
>

--
Dorien Herremans

Department of Environment, Technology and Technology Management
Faculty of Applied Economics
University of Antwerp

B.513
Prinsstraat 13
2000 Antwerp
Belgium
+32 3 265 41 25

--
Dorien Herremans

Department of Environment, Technology and Technology Management
Faculty of Applied Economics
University of Antwerp

B.513
Prinsstraat 13
2000 Antwerp
Belgium
+32 3 265 41 25

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help