rowttests() function in genefilter library
1
0
Entering edit mode
Paul Geeleher ★ 1.3k
@paul-geeleher-2679
Last seen 10.2 years ago
Hi, I am using this function to perform two sample row t-tests on a matrix: rowttests(mat, fac) I'm just wondering how the function decides which factor is on which side of the t-tests. From what I can see it's based on the order of the factors in levels(fac). So if levels(fac) is [1] "HER-" "HER+", the function will do a HER-/HER+ t-test? And positive t-stat indicates a higher mean value in "HER-" (the first) group? It may sound a stupid question but I'm getting results that completely contradict somebody else and I'd like to be 100% sure how the function decides this before I go causing trouble! Paul. -- Paul Geeleher School of Mathematics, Statistics and Applied Mathematics National University of Ireland Galway Ireland [[alternative HTML version deleted]]
GO GO • 4.1k views
ADD COMMENT
0
Entering edit mode
rgentleman ★ 5.5k
@rgentleman-7725
Last seen 9.6 years ago
United States
Hi Paul, Paul Geeleher wrote: > Hi, > > I am using this function to perform two sample row t-tests on a matrix: > > rowttests(mat, fac) > > I'm just wondering how the function decides which factor is on which side of > the t-tests. From what I can see it's based on the order of the factors in > levels(fac). > > So if levels(fac) is [1] "HER-" "HER+", the function will do a HER-/HER+ > t-test? And positive t-stat indicates a higher mean value in "HER-" (the > first) group? Just look at any row of mat, split by fac sp1 = split(mat[1,], fac) sapply(sp1, mean) and that will tell you the means in each group - from that you can easily figure out which way the t-test is being carried out. > > It may sound a stupid question but I'm getting results that completely > contradict somebody else and I'd like to be 100% sure how the function > decides this before I go causing trouble! the first of these is not as uncommon as it could be - you can be 100% sure by doing the t-test by hand (essentially what is above) you should always be cautious about the third. Sample relabling (by you or them) is a common problem - you can't easily know if they mislabeled before making it public, or just during their analysis etc. Which is why we very strongly recommend that you use and ExpressionSet for your analyses (the names above suggest you are not doing that). Robert > > Paul. > >
ADD COMMENT

Login before adding your answer.

Traffic: 639 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6