[R] ANOVA test

Kristi Glover kristi.glover at hotmail.com
Fri Dec 26 15:38:13 CET 2014


Hi R user,
I am wondering whether I can perform a simple ANOVA analysis in the data in which I  have mean + SE (+- Standard Error) for several groups. 
For this one,  I calculated upper and lower confidence interval and made three classes for each group (mean, upper and lower values). After that, I did ANOVA (simple Anova). I am wondering whether this is a wrong approach?  I have given an example


library(reshape)
B<-structure(list(mean = c(0.0241262, 0.0433538, 0.2204764, 0.7830054
), SE = c(0.0209097, 0.0329281, 0.1003248, 0.3019256), site = structure(1:4, .Label = c("A", 
"B", "C", "D"), class = "factor")), .Names = c("mean", "SE", 
"site"), class = "data.frame", row.names = c(NA, -4L))
attach(B)
B1<-data.frame(B, Upper=mean+1.96*SE, Lower=mean-1.96*SE)
B2<-subset(B1, select=c(-2))
B2
B3<-melt(B2, id=c("site"))
B3
Anova<-aov(B3$value~B3$site)
summary(Anova)

Thanks 

 		 	   		  


More information about the R-help mailing list