twilight {twilight} | R Documentation

## Estimation of the local false discovery rate

### Description

The function performs the successive exclusion procedure (SEP) as described in Scheid and Spang (2004).

### Usage

    twilight(xin, lambda = NULL, B = 0, boot.ci = 0.95, clus = NULL, verbose = TRUE)

### Arguments

`xin` | Numerical vector of p-values or a `twilight` object.
`lambda` | Numerical value denoting the penalty factor. If not specified, the function searchs for an appropriate regularization parameter.
`B` | Numerical value specifying the number of bootstrap samples. If not specified, no bootstrap estimates are calculated.
`boot.ci` | Numerical value denoting the probability value for bootstrap confidence intervals of local false discovery rate and prior pi0.
`clus` | A list or numerical value to be passed to `makeCluster(clus,...)` in `library(snow)`. If specified, bootstrapping is performed in parallel. No checks on `clus` are performed. Please make sure that `makeCluster(clus)` works properly in your environment.
`verbose` | Logical value for message printing.

### Details

In short, the successive exclusion procedure divides the set of p-values into two parts. The first part is chosen such that it resembles a uniform distribution while containing as many p-values as possible. This set of p-values represents the set of p-values derived from non-induced genes. The height of the uninform distribution is a natural estimate for the mixture parameter pi0. The p-value not contained in the uniform part serve as representatives of p-values derived from induced genes. Their distribution is the basis of the final estimate of the local false discovery rate.

NOTE: Library(snow) has to be loaded manually. It is not loaded as part of 'suggests' or 'depends' because it is only available under UNIX. If twilight does not work with the current version of snow, please send a report.

### Value

Returns a `twilight` object consisting of a `data.frame` named `result` with variables

`pvalue` | Sorted input vector.
`qvalue` | q-values computed as described in Storey and Tibshirani (2003) with new estimate `pi0`.
`index` | Index of the original ordering.
`fdr` | Local false discovery rate averaged over 10 runs of SEP.
`mean.fdr` | Bootstrap estimate of local false discovery rate.
`lower.fdr` | Lower `boot.ci`-bootstrap confidence bound.
`upper.fdr` | Upper `boot.ci`-bootstrap confidence bound.

Values are sorted by `pvalue`.

### Note

Additional output consists of

`lambda` | Regularization parameter.
`pi0` | SEP estimate of prior probability.
`boot.pi0` | Bootstrap estimate and `boot.ci`-bootstrap confidence bounds.
`boot.ci` | Passes `boot.ci` for plotting.
`effect` | Histogram of effect size distributions averaged over 10 runs of SEP.

If `xin` is of class `twilight`, the remaining slots are filled with corresponding input values. If `xin` is not of class `twilight`, these slots remain free.

### Author(s)

Stefanie Scheid http://www.molgen.mpg.de/~scheid

### References

Scheid S and Spang R (2004): A stochastic downhill search algorithm for estimating the local false discovery rate, IEEE TCBB 1(3), 98–108.

Scheid S and Spang R (2005): twilight; a Bioconductor package for estimating the local false discovery rate, Bioinformatics 21(12), 2921–2922.

Scheid S and Spang R (2006): Permutation filtering: A novel concept for significance analysis of large-scale genomic data, in: Apostolico A, Guerra C, Istrail S, Pevzner P, and Waterman M (Eds.): Research in Computational Molecular Biology: 10th Annual International Conference, Proceedings of RECOMB 2006, Venice, Italy, April 2-5, 2006. Lecture Notes in Computer Science vol. 3909, Springer, Heidelberg, pp. 338-347.

Storey JD and Tibshirani R (2003): Statistical significance for genomewide studies, PNAS 100(16), 9440–9445.

### See Also

`twilight.pval`, `plot.twilight`, `exfdr`

### Examples

    ### twilight object created with B=1000 bootstrap samples
    data(exfdr)
    print(exfdr)
    plot(exfdr)

[Package twilight version 1.14.1 Index]