Skip to content
Prev 322872 / 398503 Next

Multiple Paired T test from large Data Set with multiple pairs

If you have Sites with "ALA1", "ALA2", etc....
it would be better to do:
lst1<- split(WrackMass,substr(WrackMass$Site.X.Treatment,1,4))
?res1<-lapply(lst1,function(x) do.call(cbind,lapply(x[,1:4],function(y) {Site<- gsub(".*\\d(.*)","\\1",x$Site.X.Treatment);t.test(y[Site=="A"],y[Site=="U"],paired=TRUE)$p.value })))
?res1
#$ALA1
?# ?? Algae.Mass Seagrass.Mass Terrestrial.Mass Other.Mass
#[1,]????????? 1???? 0.7769256??????? 0.3351745? 0.6817365
#
#$BLA1
?# ?? Algae.Mass Seagrass.Mass Terrestrial.Mass Other.Mass
#[1,]? 0.6482613???? 0.9411953??????? 0.7927984? 0.3027634
#
#$CLA1
?# ?? Algae.Mass Seagrass.Mass Terrestrial.Mass Other.Mass
#[1,]?? 0.454294??? 0.02519427??????? 0.5650988? 0.2981702
A.K.

----- Original Message -----
From: arun <smartpink111 at yahoo.com>
To: R help <r-help at r-project.org>
Cc: 
Sent: Thursday, May 2, 2013 3:30 PM
Subject: Re: Multiple Paired T test from large Data Set with multiple pairs


Hi,
Still no data.