search for: ala1a

Displaying 1 result from an estimated 1 matches for "ala1a".

Did you mean: ala'a
2013 May 01
1
Multiple Paired T test from large Data Set with multiple pairs
Hi, Assuming that your dataset is similar to the one below: set.seed(25) dat1<- data.frame(Algae.Mass=sample(40:50,10,replace=TRUE),Seagrass.Mass=sample(30:70,10,replace=TRUE),Terrestrial.Mass=sample(80:100,10,replace=TRUE),Other.Mass=sample(40:60,10,replace=TRUE),Site.X.Treatment=rep(c("ALA1A","ALA1U"),each=5),stringsAsFactors=FALSE) library(reshape2) dat2<-melt(dat1,id.var="Site.X.Treatment") sapply(split(dat2,dat2$variable),function(x) t.test(x[x$Site.X.Treatment=="ALA1A",3],x[x$Site.X.Treatment=="ALA1U",3],paired=TRUE)$p.value) ? #???...