t-test for microarray analysis in R
0
0
Entering edit mode
6.2 years ago
gladnovin • 0

HI, I have a code , I dont know if the code exactly falls for paired t test or not?

logX.cl <- c(0, 0, 1,1)
ttest = function(x) {
  tt = t.test(x[logX.cl == 0], x[logX.cl == 1])
  return(c(tt$statistic, tt$p.value))
}
R • 1.3k views
ADD COMMENT
2
Entering edit mode

No, look here: https://stat.ethz.ch/R-manual/R-devel/library/stats/html/t.test.html

t.test(..., ..., paired=TRUE)

In this example, though, you are literally just comparing 2 values versus 2 values - makes no sense (?). Whatever is in the object x, you will only be taking index 1-4 from it.

Can you please explain what you are aiming to do? For microarray data, the common (and I would say standardised, at this stage) method to use is limma: https://bioconductor.org/packages/release/bioc/html/limma.html

ADD REPLY

Login before adding your answer.

Traffic: 2530 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