Learn R Programming

genefilter (version 1.54.2)

filtered_p: Compute and adjust p-values, with filtering

Description

Given filter and test statistics in the form of unadjusted p-values, or functions able to compute these statistics from the data, filter and then correct the p-values across a range of filtering stringencies.

Usage

filtered_p(filter, test, theta, data, method = "none")
filtered_R(alpha, filter, test, theta, data, method = "none")

Arguments

alpha
A cutoff to which p-values, possibly adjusted for multiple testing, will be compared.
filter
A vector of stage-one filter statistics, or a function which is able to compute this vector from data, if data is supplied.
test
A vector of unadjusted p-values, or a function which is able to compute this vector from the filtered portion of data, if data is supplied. The option to supply a function is useful when the value of the test statistic depends on which hypotheses are filtered out at stage one. (The limma t-statistic is an example.)
theta
A vector with one or more filtering fractions to consider. Actual cutoffs are then computed internally by applying quantile to the filter statistics contained in (or produced by) the filter argument.
data
If filter and/or test are functions rather than vectors of statistics, they will be applied to data. The functions will be passed the whole data object, and must work over rows, etc. themselves as appropriate.
method
The unadjusted p-values contained in (or produced by) test will be adjusted for multiple testing after filtering, using the p.adjust function in the stats package. See the method argument there for options.

Value

  • For filtered_p, a matrix of p-values, possible adjusted for multiple testing, with one row per null hypothesis and one column per filtering fraction given in theta. For a given column, entries which have been filtered out are NA.

    For filtered_R, a count of the entries in the filtered_p result which are less than alpha.

See Also

See rejection_plot for visualization of filtered_p results.

Examples

Run this code
# See the vignette: Diagnostic plots for independent filtering

Run the code above in your browser using DataLab