Question: t-test for microarray analysis in R
0
gravatar for gladnovin
6 months ago by
gladnovin0
gladnovin0 wrote:

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 • 253 views
ADD COMMENTlink modified 6 months ago by Biostar ♦♦ 20 • written 6 months ago by gladnovin0
2

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 REPLYlink written 6 months ago by Kevin Blighe28k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1029 users visited in the last hour