|
Hi folks,
Where can I find document re "how to read anova output"? Google found many of them. But seemingly non of them can explain to me following output:- > tabA = c(5.67, 5.67, 5.55, 5.57) > tabB = c(5.75, 5.47, 5.43, 5.45) > tabC = c(4.74, 4.45, 4.65, 4.94) > tabs = data.frame(tabA, tabB, tabC) > tablets = stack(tabs) > anova(lm(values ~ ind, data = tablets)) Analysis of Variance Table Response: values Df Sum Sq Mean Sq F value Pr(>F) ind 2 2.05787 1.02893 45.239 2.015e-05 *** Residuals 9 0.20470 0.02274 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > TukeyHSD(aov(values ~ ind, data = tablets)) Tukey multiple comparisons of means 95% family-wise confidence level Fit: aov(formula = values ~ ind, data = tablets) $ind diff lwr upr p adj tabB-tabA -0.09 -0.3877412 0.2077412 0.6866791 tabC-tabA -0.92 -1.2177412 -0.6222588 0.0000321 tabC-tabB -0.83 -1.1277412 -0.5322588 0.0000731 Please help. TIA B.R. Stephen L ______________________________________________ [hidden email] 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. |
|
On Wed, 2010-08-18 at 00:42 -0700, Stephen Liu wrote:
> Hi folks, > > > Where can I find document re "how to read anova output"? Google found many of > them. But seemingly non of them can explain to me following output:- > > > > tabA = c(5.67, 5.67, 5.55, 5.57) > > tabB = c(5.75, 5.47, 5.43, 5.45) > > tabC = c(4.74, 4.45, 4.65, 4.94) > > tabs = data.frame(tabA, tabB, tabC) > > > tablets = stack(tabs) > > > > anova(lm(values ~ ind, data = tablets)) > Analysis of Variance Table > Response: values > Df Sum Sq Mean Sq F value Pr(>F) > ind 2 2.05787 1.02893 45.239 2.015e-05 *** > Residuals 9 0.20470 0.02274 > --- > Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 That output is designed to look like ANOVA tables from classical text books, so any introductory textbook designed for your particular background or area of knowledge would probably help you understand it. Many of the R books that do introductory stats aren't really concerned with teaching the stats side of things so might not go into much detail explaining the table, assuming that this is covered elsewhere. There will be exceptions of course. HTH G > > > TukeyHSD(aov(values ~ ind, data = tablets)) > Tukey multiple comparisons of means > 95% family-wise confidence level > Fit: aov(formula = values ~ ind, data = tablets) > $ind > diff lwr upr p adj > tabB-tabA -0.09 -0.3877412 0.2077412 0.6866791 > tabC-tabA -0.92 -1.2177412 -0.6222588 0.0000321 > tabC-tabB -0.83 -1.1277412 -0.5322588 0.0000731 > > > Please help. TIA > > > B.R. > Stephen L > > > > ______________________________________________ > [hidden email] 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. -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ______________________________________________ [hidden email] 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. |
|
In reply to this post by satimis
On 18-Aug-10 07:42:23, Stephen Liu wrote:
> Hi folks, > Where can I find document re "how to read anova output"? > Google found many of them. But seemingly non of them can > explain to me following output:- > >> tabA = c(5.67, 5.67, 5.55, 5.57) >> tabB = c(5.75, 5.47, 5.43, 5.45) >> tabC = c(4.74, 4.45, 4.65, 4.94) >> tabs = data.frame(tabA, tabB, tabC) > >> tablets = stack(tabs) > >> anova(lm(values ~ ind, data = tablets)) > Analysis of Variance Table > Response: values > Df Sum Sq Mean Sq F value Pr(>F) > ind 2 2.05787 1.02893 45.239 2.015e-05 *** > Residuals 9 0.20470 0.02274 > --- > Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 The above is the basic standard format for the results of a 1-way analysis of variance (differences between means of groups compared with within-group differences between observations and group means). You need to understand how that works (basic statistical theory) before even thinking of looking at the Tukey thing (omitted in this reply). The following is an explanation of your 1-way ANOVA written entirely in R (preceded by a duplicate of your ANOVA output): ## anova(lm(values ~ ind, data = tablets)) ## Analysis of Variance Table ## Response: values ## Df Sum Sq Mean Sq F value Pr(>F) ## ind 2 2.05787 1.02893 45.239 2.015e-05 *** ## Residuals 9 0.20470 0.02274 ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 tabA = c(5.67, 5.67, 5.55, 5.57) tabB = c(5.75, 5.47, 5.43, 5.45) tabC = c(4.74, 4.45, 4.65, 4.94) nA <- length(tabA) ; nB <- length(tabB) ; nC <- length(tabC) nG <- nA + nB + nC mG <- mean(c(tabA,tabB,tabC)) mA <- mean(tabA) ; mB <- mean(tabB) ; mC <- mean(tabC) SSres <- sum((tabA-mA)^2) + sum((tabB-mB)^2) + sum((tabC-mC)^2) SSres # = 0.2047 SSeff <- nA*(mA-mG)^2 + nB*(mB-mG)^2 + nC*(mC-mG)^2 SSeff # = 2.057867 ## Number of groups = 3 hence df.groups = (3-1) = 2 df.groups <- 2 meanSSeff <- SSeff/df.groups meanSSeff # = 1.028933 ## df for residuals in each group = (n.group - 1): df.res <- (nA-1) + (nB-1) + (nC-1) ## = 3 + 3 + 3 = 9 meanSSres <- SSres/df.res meanSSres # = 0.02274444 ## Fisher's F-ratio statistic = meanSSeff/meanSSres: F <- meanSSeff/meanSSres F # = 45.23889 ## P-value for F as test of difference between group means ## relative to within-group residuals (upper tail): Pval <- pf(F, df.groups, df.res, lower.tail=FALSE) Pval # = 2.015227e-05 Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <[hidden email]> Fax-to-email: +44 (0)870 094 0861 Date: 18-Aug-10 Time: 09:41:08 ------------------------------ XFMail ------------------------------ ______________________________________________ [hidden email] 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. |
|
----- Original Message ----
From: "[hidden email]" <[hidden email]> To: [hidden email] Cc: Stephen Liu <[hidden email]> Sent: Wed, August 18, 2010 4:41:11 PM Subject: RE: [R] How to read ANOVA output Hi Ted, Thanks for your advice. - snip - >You need to understand how that works (basic >statistical theory) before even thinking of looking at the >Tukey thing (omitted in this reply). I have been googling a while. There were many documents discovered. I wonder where shall I start? Which direction shall I choose? Could you please shed me some hints. TIA I found follows; Basic Inferential Statistics: Theory and Application http://owl.english.purdue.edu/owl/resource/672/05/ Basic Statistics-I http://works.bepress.com/durgesh_chandra_pathak/10/ file download basic_Statistics-I-fulltext.pdf >The following is an explanation of your 1-way ANOVA written >entirely in R (preceded by a duplicate of your ANOVA output): Performed following steps:- ## anova(lm(values ~ ind, data = tablets)) ## Analysis of Variance Table ## Response: values ## Df Sum Sq Mean Sq F value Pr(>F) ## ind 2 2.05787 1.02893 45.239 2.015e-05 *** ## Residuals 9 0.20470 0.02274 ## --- ## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 tabA = c(5.67, 5.67, 5.55, 5.57) tabB = c(5.75, 5.47, 5.43, 5.45) tabC = c(4.74, 4.45, 4.65, 4.94) nA <- length(tabA) ; nB <- length(tabB) ; nC <- length(tabC) nG <- nA + nB + nC > nG [1] 12 mG <- mean(c(tabA,tabB,tabC)) mA <- mean(tabA) ; mB <- mean(tabB) ; mC <- mean(tabC) SSres <- sum((tabA-mA)^2) + sum((tabB-mB)^2) + sum((tabC-mC)^2) SSres # = 0.2047 [1] 0.2047 ( I suppose - ^2 here means a raised to the power of 2) ?? ( SSres is the sum of squares residual (or sum of squares error it is sometimes called), which is the variation in the dependent variable that is not predicted by the model. Adding the SSreg to the SSres gives the SStotal, which represents how much variation there is in the data overall) ?? SSeff <- nA*(mA-mG)^2 + nB*(mB-mG)^2 + nC*(mC-mG)^2 SSeff # = 2.057867 [1] 2.057867 (What does SSeff refer to here)?? ## Number of groups = 3 hence df.groups = (3-1) = 2 (?df Description: Density, distribution function, quantile function and random generation for the F distribution with ‘df1’ and ‘df2’ degrees of freedom (and optional non-centrality parameter ‘ncp’). What does df refer here? ) ?? df.groups <- 2 meanSSeff <- SSeff/df.groups meanSSeff # = 1.028933 [1] 0.02274444 ## df for residuals in each group = (n.group - 1): df.res <- (nA-1) + (nB-1) + (nC-1) ## = 3 + 3 + 3 = 9 meanSSres <- SSres/df.res meanSSres # = 0.02274444 [1] 0.02274444 ## Fisher's F-ratio statistic = meanSSeff/meanSSres: F <- meanSSeff/meanSSres F # = 45.23889 [1] 45.23889 (Fisher's F-ratio F-test ??? http://en.wikipedia.org/wiki/F-test ) ## P-value for F as test of difference between group means ## relative to within-group residuals (upper tail): Pval <- pf(F, df.groups, df.res, lower.tail=FALSE) Pval # = 2.015227e-05 [1] 2.015227e-05 (The P-values for the Popular Distributions http://home.ubalt.edu/ntsbarsh/Business-stat/otherapplets/pvalues.htm ) ?? If I'm wrong please correct me. TIA B.R. Stephen ______________________________________________ [hidden email] 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. |
|
In reply to this post by Gavin Simpson
----- Original Message ----
From: Gavin Simpson <[hidden email]> To: Stephen Liu <[hidden email]> Cc: [hidden email] Sent: Wed, August 18, 2010 4:13:03 PM Subject: Re: [R] How to read ANOVA output Hi Gavin, Thanks for your advice. > > tabA = c(5.67, 5.67, 5.55, 5.57) > > tabB = c(5.75, 5.47, 5.43, 5.45) > > tabC = c(4.74, 4.45, 4.65, 4.94) > > tabs = data.frame(tabA, tabB, tabC) > > > tablets = stack(tabs) > > > > anova(lm(values ~ ind, data = tablets)) >> Analysis of Variance Table >> Response: values >> Df Sum Sq Mean Sq F value Pr(>F) >> ind 2 2.05787 1.02893 45.239 2.015e-05 *** >> Residuals 9 0.20470 0.02274 >> --- > >Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 >That output is designed to look like ANOVA tables from classical text >books, so any introductory textbook designed for your particular >background or area of knowledge would probably help you understand it. - snip - Could you pls shed me some hints where can I find the relevant online document for my use? Google search brought me tons of output. To go through all it would take lengthy time. Also it may lead me to the wrong direction. TIA B.R. Stephen ______________________________________________ [hidden email] 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. |
|
He's already sent you some good advice.
Go to amazon.com and search for "basic statistics" + your area in "Books". Giving you specific recommendations will also take a lot of time, both for us and you, especially seeing as we don't really know what area or subject you're looking for. Any basic book should give you enough knowledge to understand the basics of ANOVA and statistics in general. You should also find a book with basic problems and answers, so you can try them out yourself. Siri. Siterer "Stephen Liu" <[hidden email]>: > ----- Original Message ---- > > From: Gavin Simpson <[hidden email]> > To: Stephen Liu <[hidden email]> > Cc: [hidden email] > Sent: Wed, August 18, 2010 4:13:03 PM > Subject: Re: [R] How to read ANOVA output > > Hi Gavin, > > > Thanks for your advice. > > >> > tabA = c(5.67, 5.67, 5.55, 5.57) >> > tabB = c(5.75, 5.47, 5.43, 5.45) >> > tabC = c(4.74, 4.45, 4.65, 4.94) >> > tabs = data.frame(tabA, tabB, tabC) >> >> > tablets = stack(tabs) >> >> >> > anova(lm(values ~ ind, data = tablets)) >>> Analysis of Variance Table >>> Response: values >>> Df Sum Sq Mean Sq F value Pr(>F) >>> ind 2 2.05787 1.02893 45.239 2.015e-05 *** >>> Residuals 9 0.20470 0.02274 >>> --- >> >Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > >> That output is designed to look like ANOVA tables from classical text >> books, so any introductory textbook designed for your particular >> background or area of knowledge would probably help you understand it. > > - snip - > > Could you pls shed me some hints where can I find the relevant > online document > for my use? Google search brought me tons of output. To go through all it > would take lengthy time. Also it may lead me to the wrong direction. > > TIA > > > B.R. > Stephen > > > > ______________________________________________ > [hidden email] 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. > ______________________________________________ [hidden email] 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. |
|
In reply to this post by satimis
Hey all who have responded to this post. I am a newbie to ANOVA analysis in R, and let me tell you- resources for us learners are scant, horrible, unclear, imprecise.. in other words.. the worst ever. So advice like "go look it up" in your "classical" textbook or on google is not helpful at all. I am scouring posts like these to try to find some kind soul who not only understands the basics, but is willing to help us new folk out.. sadly.. here is not the place.
|
|
My experience is the opposite -- the web is filled with introductory
statistics material, some of it quite good. If you google for "introduction to anova textbook" the first hit seems to give exactly what you are asking for. The fifth one down the list also looks good (http://vassarstats.net/textbook/ch13pt1.html). And that's just what you get for free! If you want more you can buy a textbook. I don't understand why you are reluctant to take this advice, or why you think someone here is going to be able to explain it better than a good textbook will. Best, Ista On Wed, May 2, 2012 at 1:37 AM, aRghhhhhh <[hidden email]> wrote: > Hey all who have responded to this post. I am a newbie to ANOVA analysis in > R, and let me tell you- resources for us learners are scant, horrible, > unclear, imprecise.. in other words.. the worst ever. So advice like "go > look it up" in your "classical" textbook or on google is not helpful at all. > I am scouring posts like these to try to find some kind soul who not only > understands the basics, but is willing to help us new folk out.. sadly.. > here is not the place. > > -- > View this message in context: http://r.789695.n4.nabble.com/How-to-read-ANOVA-output-tp2329457p4602403.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > [hidden email] 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. ______________________________________________ [hidden email] 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. |
|
Or look for A handbook of Statistical Analyses using R. (Everitt and Holhorn) available on line in pdf format.
John Kane Kingston ON Canada > -----Original Message----- > From: [hidden email] > Sent: Wed, 2 May 2012 07:01:22 -0400 > To: [hidden email] > Subject: Re: [R] How to read ANOVA output > > My experience is the opposite -- the web is filled with introductory > statistics material, some of it quite good. If you google for > "introduction to anova textbook" the first hit seems to give exactly > what you are asking for. The fifth one down the list also looks good > (http://vassarstats.net/textbook/ch13pt1.html). And that's just what > you get for free! If you want more you can buy a textbook. I don't > understand why you are reluctant to take this advice, or why you think > someone here is going to be able to explain it better than a good > textbook will. > > Best, > Ista > > On Wed, May 2, 2012 at 1:37 AM, aRghhhhhh <[hidden email]> > wrote: >> Hey all who have responded to this post. I am a newbie to ANOVA analysis >> in >> R, and let me tell you- resources for us learners are scant, horrible, >> unclear, imprecise.. in other words.. the worst ever. So advice like "go >> look it up" in your "classical" textbook or on google is not helpful at >> all. >> I am scouring posts like these to try to find some kind soul who not >> only >> understands the basics, but is willing to help us new folk out.. sadly.. >> here is not the place. >> >> -- >> View this message in context: >> http://r.789695.n4.nabble.com/How-to-read-ANOVA-output-tp2329457p4602403.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> [hidden email] 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. > > ______________________________________________ > [hidden email] 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. ____________________________________________________________ GET FREE SMILEYS FOR YOUR IM & EMAIL - Learn more at http://www.inbox.com/smileys Works with AIM®, MSN® Messenger, Yahoo!® Messenger, ICQ®, Google Talk™ and most webmails ______________________________________________ [hidden email] 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. |
|
In reply to this post by satimis
Hi,
Take a look at http://www.khanacademy.org/ Look near the bottom of the page and there is a whole section on statistics and 3 videos on ANOVA. It is a very good introduction and I find it very useful to know how the test works so that I'm not using a "Black Box" Also I wrote up a little section on ANOVA that you can see at: https://sites.google.com/site/davidsstatistics/using-r/anova-nonparameteric Take Care David
Take Care
David Doyle |
|
In reply to this post by aRghhhhhh
Hey all who have responded to this post. I am a newbie to ANOVA analysis in
R, and let me tell you- resources for us learners are scant, horrible, unclear, imprecise.. in other words.. the worst ever. So advice like "go look it up" in your "classical" textbook or on google is not helpful at all. I am scouring posts like these to try to find some kind soul who not only understands the basics, but is willing to help us new folk out.. sadly.. here is not the place. -- Although it would be rude to tell you to go look it up yourself, you do not pose a specific problem so it is impossible to provide a specific answer. This is why there is a posting guide requesting that you do so. Further, you pose your question in a rather rude way which makes the list readers less likely to want to help you! I myself am a user of statistics, not a statistician, but I firmly believe that we must understand the statistics we use. That means you won't get a prescriptive answer from me without a focused question. What made a huge difference for me in understanding ANOVA in R was John Fox's book, An R and S-Plus Companion to Applied Regression Analysis. It really helps understand the R way of doing things. Another helpful resource for some of the classical ANOVA models is Murray Logan's, Biostatistical Design and Analysis Using R: A Practical Guide . It is an R resource that follows the Quinn and Keogh Experimental and Data Analysis text with plenty of R code and examples. The only downside to the latter text is that it has numerous typos that seem to have escaped the editing process. If you haven't already, I'd check these two resources. Rob ------------------------------------------ Robert W. Baer, Ph.D. Professor of Physiology Kirksville College of Osteopathic Medicine A. T. Still University of Health Sciences 800 W. Jefferson St. Kirksville, MO 63501 660-626-2322 FAX 660-626-2965 ______________________________________________ [hidden email] 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. |
| Powered by Nabble | Edit this page |
