fdc {arrayMagic} | R Documentation

## FDC (false discovery count)

### Description

Estimate the FDC (false discovery count) through permutations

### Usage

    fdc(x, fac,
      teststatfun = "rowFtests",
      nrperm      = 100,
      nrgenesel   = c(10, 20, 40, 60, 80, 100, 200),
      ...)

### Arguments

`x` | Matrix.
`fac` | Factor, with `length(fac)=ncol(x)`.
`teststatfun` | Character. Name of a function that takes arguments `x` and `fac`, and returns a list with component `statistic`. See for example `rowFtests` in package genefilter.
`nrperm` | Numeric. Number of permutations.
`nrgenesel` | Numeric. A vector with the 'number of genes' for which the FDC is to be calculated.
`...` | Further arguments passed to code{teststatfun}.

### Value

A list with elements `stat`: the test statistics; `mpstat`: median permuted test statistics; `fdc`: estimated false discovery counts; `thresh`: the threshholds associated with `nrgenesel`; `nrgenesel`

### Author(s)

Wolfgang Huber <w.huber@dkfz.de>

### See Also

`rowFtests`

### Examples

       ## data matrix: 2000 genes, 16 samples
       x  <- matrix(runif(2000*16), ncol=16)
       ## 8 blue and 8 red samples
       fac <- factor(c(rep("blue", 8), rep("red", 8)))
       ## implant differential signal into the first 50 genes
       x[1:50, fac=="blue"] <- x[1:50, fac=="blue"] + 1

       library(genefilter)
       res <- fdc(x, fac)
       plot(res$nrgenesel, res$fdc, pch=16, col="blue",
           xlab="Number of genes selected",
           ylab="Expected number of false discoveries")
       abline(a=0, b=1, col="red", lwd=2)

       qqplot(res$stat, res$mpstat, pch=".")
       abline(a=0, b=1, col="red", lwd=2)

[Package arrayMagic version 1.12.2 Index]