Hi all, I have following data. When I perform an anova, the residual sum of square returns to be zero. But this is wrong, since we can hand calculate the RSS to be around 0.0308. Did anyone come across the same problem before? Any suggestions? Thanks. Hanna> ydataY sample.Y 1 0.477 0.5 2 0.477 0.5 3 0.478 0.5 4 27.320 27 5 27.420 27 6 27.300 27 7 29.440 29 8 29.620 29 9 29.610 29 10 35.840 35 11 35.900 35 12 35.850 35> fit.Y <- aov(Y~sample.Y, data=ydata) > summary(fit.Y)Df Sum Sq Mean Sq F value Pr(>F) sample.Y 3 2203 734.2 190706 <2e-16 *** Residuals 8 0 0.0 --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 [[alternative HTML version deleted]]
Li Li - I belive it's a rounding error -- try setting options(digits=8) before displaying the output:> summary(fit.Y)Df Sum Sq Mean Sq F value Pr(>F) sample.Y 3 2203 734 190706 <2e-16 *** Residuals 8 0 0 --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1> summary(fit.Y)Df Sum Sq Mean Sq F value Pr(>F) sample.Y 3 2202.70 734.23 190706 < 2.2e-16 *** Residuals 8 0.03 0.00 --- Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu On Tue, 14 Apr 2015, li li wrote:> Hi all, > I have following data. When I perform an anova, the residual sum of > square returns to be zero. > But this is wrong, since we can hand calculate the RSS to be around 0.0308. > Did anyone come across the same problem before? Any suggestions? > Thanks. > Hanna > >> ydata > Y sample.Y > 1 0.477 0.5 > 2 0.477 0.5 > 3 0.478 0.5 > 4 27.320 27 > 5 27.420 27 > 6 27.300 27 > 7 29.440 29 > 8 29.620 29 > 9 29.610 29 > 10 35.840 35 > 11 35.900 35 > 12 35.850 35 >> fit.Y <- aov(Y~sample.Y, data=ydata) >> summary(fit.Y) > Df Sum Sq Mean Sq F value Pr(>F) > sample.Y 3 2203 734.2 190706 <2e-16 *** > Residuals 8 0 0.0 > --- > Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
It is a printing problem - the default number of digits in print.summary.aov is max(3L, getOption("digits") - 3L). Set options(digits=7) instead of your current 6 (?) or try print(summary(fit.Y), digits=7) to see more digits. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Apr 14, 2015 at 10:23 AM, li li <hannah.hlx at gmail.com> wrote:> Hi all, > I have following data. When I perform an anova, the residual sum of > square returns to be zero. > But this is wrong, since we can hand calculate the RSS to be around 0.0308. > Did anyone come across the same problem before? Any suggestions? > Thanks. > Hanna > > > ydata > Y sample.Y > 1 0.477 0.5 > 2 0.477 0.5 > 3 0.478 0.5 > 4 27.320 27 > 5 27.420 27 > 6 27.300 27 > 7 29.440 29 > 8 29.620 29 > 9 29.610 29 > 10 35.840 35 > 11 35.900 35 > 12 35.850 35 > > fit.Y <- aov(Y~sample.Y, data=ydata) > > summary(fit.Y) > Df Sum Sq Mean Sq F value Pr(>F) > sample.Y 3 2203 734.2 190706 <2e-16 *** > Residuals 8 0 0.0 > --- > Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.[[alternative HTML version deleted]]
See in-line On 14/04/2015 18:23, li li wrote:> Hi all, > I have following data. When I perform an anova, the residual sum of > square returns to be zero. > But this is wrong, since we can hand calculate the RSS to be around 0.0308. > Did anyone come across the same problem before? Any suggestions? > Thanks. > Hanna > >> ydata > Y sample.Y > 1 0.477 0.5 > 2 0.477 0.5 > 3 0.478 0.5 > 4 27.320 27 > 5 27.420 27 > 6 27.300 27 > 7 29.440 29 > 8 29.620 29 > 9 29.610 29 > 10 35.840 35 > 11 35.900 35 > 12 35.850 35 >> fit.Y <- aov(Y~sample.Y, data=ydata) >> summary(fit.Y) > Df Sum Sq Mean Sq F value Pr(>F) > sample.Y 3 2203 734.2 190706 <2e-16 *** > Residuals 8 0 0.0 > --- > Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 >734.2 / 197096 [1] 0.003725088 Did you mean 0.0038 above?> [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >-- Michael http://www.dewey.myzen.co.uk/home.html
0.003725088 is the mean square error. 2015-04-14 13:44 GMT-04:00 Michael Dewey <lists at dewey.myzen.co.uk>:> See in-line > > > On 14/04/2015 18:23, li li wrote: > >> Hi all, >> I have following data. When I perform an anova, the residual sum of >> square returns to be zero. >> But this is wrong, since we can hand calculate the RSS to be around >> 0.0308. >> Did anyone come across the same problem before? Any suggestions? >> Thanks. >> Hanna >> >> ydata >>> >> Y sample.Y >> 1 0.477 0.5 >> 2 0.477 0.5 >> 3 0.478 0.5 >> 4 27.320 27 >> 5 27.420 27 >> 6 27.300 27 >> 7 29.440 29 >> 8 29.620 29 >> 9 29.610 29 >> 10 35.840 35 >> 11 35.900 35 >> 12 35.850 35 >> >>> fit.Y <- aov(Y~sample.Y, data=ydata) >>> summary(fit.Y) >>> >> Df Sum Sq Mean Sq F value Pr(>F) >> sample.Y 3 2203 734.2 190706 <2e-16 *** >> Residuals 8 0 0.0 >> --- >> Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 >> >> > 734.2 / 197096 > [1] 0.003725088 > > Did you mean 0.0038 above? > > [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/ >> posting-guide.html <http://www.r-project.org/posting-guide.html> >> and provide commented, minimal, self-contained, reproducible code. >> >> > -- > Michael > http://www.dewey.myzen.co.uk/home.html >[[alternative HTML version deleted]]