tag:blogger.com,1999:blog-4274823366855967619.post3347153346897537413..comments2023-08-04T10:19:18.233+02:00Comments on Statistic on aiR: Analysis of variance: ANOVA, for multiple comparisonsTodos Logoshttp://www.blogger.com/profile/09881188152777475558noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-4274823366855967619.post-4525270368064343542016-10-13T19:38:32.651+02:002016-10-13T19:38:32.651+02:00Thank you for this nice tutorial. Another good res...Thank you for this nice tutorial. Another good ressources on ANOVA can be found at http://www.sthda.com/english/wiki/one-way-anova-test-in-rANOVAhttp://www.sthda.com/english/wiki/one-way-anova-test-in-rnoreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-30117162736679812372014-08-19T11:05:16.898+02:002014-08-19T11:05:16.898+02:00Hi Sir
Would it be possible to run the Flingner-Ki...Hi Sir<br />Would it be possible to run the Flingner-Killeen test on the data from the four stores if one of the managers had forgotten to report their consumption of kilowatts one month? what would be the r-code for the groups be then?<br />Best regardsAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-74074796047873611492012-11-23T17:42:21.520+01:002012-11-23T17:42:21.520+01:00I have a doubt: I´ve run an anova of 2 factors wit...I have a doubt: I´ve run an anova of 2 factors with only one observation per cell. In this case one can´t test the homogeneity of variances due to lack of observations in each group.However, if you run a bartlett test, you get a result. What does it do in this case? I can´t understandAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-46766279454691463192011-01-04T13:16:54.829+01:002011-01-04T13:16:54.829+01:00thank youthank youAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-9315953473955335952010-02-02T10:03:34.039+01:002010-02-02T10:03:34.039+01:00Hi Sir ,
It was really a silly mistake. Thank yo...Hi Sir ,<br /><br />It was really a silly mistake. Thank you very much for pointing it out.<br /><br />Best Regards,<br /><br />RodneyUnknownhttps://www.blogger.com/profile/10877446062780293295noreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-36152708382206551162010-02-02T09:00:51.645+01:002010-02-02T09:00:51.645+01:00Hi Rodney,
the two methods for declaring groups ar...Hi Rodney,<br />the two methods for declaring groups are totally equivalent, and you write the right code.<br />There is only an error:<br /><br />Group 1 of dataset 1 is:<br /><i>110</i>, 13, 14, 13<br />Group 1 of dataset 2 is:<br /><i>10</i>, 13, 14, 13<br /><br />Of course the two ANOVA tables are different (different variables). If you correct the first variable, you will obtain the same ANOVA table.<br /><br />:)Todos Logoshttps://www.blogger.com/profile/09881188152777475558noreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-81482641092947902252010-02-02T06:41:23.040+01:002010-02-02T06:41:23.040+01:00Hi Sir ,
I have the same test dataset organized i...Hi Sir ,<br /><br />I have the same test dataset organized in two different formats. I tried to do single factor ANOVA on both the formats which resulted two different results for P value. Can you please help me to know where the problem is? I am afraid I did something wrong in declaring the factor variable.<br /><br /> Dataset 1 <br /> <br />110 17 11 10 <br />13 12 7 12<br />14 18 9 8<br />13 13 13 7<br /><br />Dataset 2 <br />10 1<br />13 1<br />14 1<br />13 1<br />17 2<br />12 2<br />18 2<br />13 2<br />11 3<br />7 3<br />9 3<br />13 3<br />10 4<br />12 4<br />8 4<br />7 4<br /><br /> I followed this procedure for Dataset 1 in R following the blog <br /><br />> test1 <- read.table("c://anova/dataset1.txt")<br />> names(test1) = c ("low" , "mod","high","veryhigh")<br />> attach(test1)<br />> merge <- c(low , mod , high , veryhigh)<br />> groups <- factor(rep(letters[1:4], each = 4))<br />> fit <- lm(formula = merge ~ groups) <br />> anova(fit)<br /><br />Analysis of Variance Table<br /><br />Response: merge<br /> Df Sum Sq Mean Sq F value Pr(>F)<br />groups 3 2119.2 706.4 1.199 0.3518<br />Residuals 12 7069.8 589.1 <br /><br />I followed this procedure for Dataset 2 in R follwing (http://www.agr.kuleuven.ac.be/vakken/statisticsbyR/ANOVAbyRr/multiplecomp.htm)<br /><br />> test2 <- read.table ("c://anova/dataset2.txt")<br />> names(test2) = c("data", "Brand")<br />> attach(test2)<br />> Brand <- factor(Brand)<br />> fit <- lm(formula = data ~ Brand) <br />> anova(fit)<br /><br />Analysis of Variance Table<br /><br />Response: data<br /> Df Sum Sq Mean Sq F value Pr(>F) <br />Brand 3 81.688 27.229 4.6846 0.02176 *<br />Residuals 12 69.750 5.812 <br />---<br />This will help me to do ANOVA in the orginal dataset for my analysis.<br /><br />Many Thanks ,<br /><br />Rodney , Australia <br />RodneyUnknownhttps://www.blogger.com/profile/10877446062780293295noreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-36078241067238863032010-01-07T13:31:37.860+01:002010-01-07T13:31:37.860+01:00Hi Samuel,
A question: are you performing a compar...Hi Samuel,<br />A question: are you performing a comparison between Rep1, Rep2, Rep3; or are you performing a comparison between Treatments, considering only one Rep?<br />Because you cannot perform an ANOVA considering replication AND treatment simultaneously: it is a "repeated measures ANOVA", which in R has another syntax.<br /><br />However the bar.err() function plots the name of the factor you are considering in default.<br /><br />(maybe, if you want, send at my e-mail your Excel file with all data, so I can have a better idea of your problem)Todos Logoshttps://www.blogger.com/profile/09881188152777475558noreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-65284653095777963702010-01-07T10:22:11.768+01:002010-01-07T10:22:11.768+01:00Sir, it works so nicely, thanks, the reason I want...Sir, it works so nicely, thanks, the reason I wanted to use is this, I wanted to do my data entry in MS excel as I wanted multiple columns, each column as a replication.<br />Treatment Rep1 Rep2 Rep3<br />Tridemorph (0.1%) 33.89 32.45 35.67<br /><br />Sir I have another request, in the graph I would be happy if each bar has the treatment name as its label, now I am seeing only 3 labels,<br />thanking you very much, yours sincerely, <br />Dr.D.K.Samuel, Plant Virologist, Ind Inst of Horticultural Research, Bangalore - 89, IndiaDuleep Samuelhttps://www.blogger.com/profile/00157369685945372551noreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-27383121041584854992010-01-07T09:14:12.638+01:002010-01-07T09:14:12.638+01:00Sorry, before the comparison, you have to attach y...Sorry, before the comparison, you have to attach your data:<br /><br /><b>attach(mydata.m)</b><br /><br />I hope this help you.Todos Logoshttps://www.blogger.com/profile/09881188152777475558noreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-78628945614404873312010-01-07T09:06:57.278+01:002010-01-07T09:06:57.278+01:00Hi Samuel,
why you want to read the ANOVA table fr...Hi Samuel,<br />why you want to read the ANOVA table from Excel, while you have all data in R, to perform the LSD.test?<br /><br />With your data, you can proceed as follow:<br /><br /><b>df<-df.residual(fit)<br />MSerror<-deviance(fit)/df<br />library(agricolae)<br />comparison <- LSD.test(value, Treatment, df, MSerror, group=FALSE)<br />comparison<br />bar.err(comparison,std=TRUE,ylim=c(0,45),density=4,border="blue")</b><br /><br />So you can perform your post-hoc test.Todos Logoshttps://www.blogger.com/profile/09881188152777475558noreply@blogger.comtag:blogger.com,1999:blog-4274823366855967619.post-36620917948099890772010-01-07T07:54:50.021+01:002010-01-07T07:54:50.021+01:00Sir, I wanted to compute Fisher's least signif...Sir, I wanted to compute Fisher's least significant difference (LSD) method<br />I used the following code to read the table<br /><br />library(RODBC)<br />> library(agricolae)<br />> channel <- odbcConnectExcel("G:/oneway.xls")<br />> mydata <- sqlFetch(channel,"Sheet1")<br />> library(reshape)<br />> mydata.m <- melt(mydata, id=c("Treatment"))<br />> fit <- aov(value~Treatment, data=mydata.m)<br />> summary(fit)<br />Df Sum Sq Mean Sq F value Pr(>F)<br />Treatment 9 23494.8 2610.54 1589.5 < 2.2e-16 ***<br />Residuals 23 37.8 1.64<br />---<br />Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1<br /><br />then I used the following code as given in the following sites<br /><br />http://cran.r-project.org/web/packages/agricolae/index.html<br />http://tarwi.lamolina.edu.pe/~fmendiburu/<br /><br />library(agricolae)<br />LSD.test()<br />comparison <- LSD.test(Treatment,Residuals,df,MSerror,group=F)<br /><br />but I could not proceed any further,<br /><br /><br />How can I read ANOVA data from an Excel table and find out the LSD and graph it as done in Agricolae. This information will help me analyse field experimental data, thanks, Samuel, Bangalore, IndiaDuleep Samuelhttps://www.blogger.com/profile/00157369685945372551noreply@blogger.com