| Literature DB >> 34956625 |
Megan H Murray1, Jeffrey D Blume1,2.
Abstract
False discovery rates (FDR) are an essential component of statistical inference, representing the propensity for an observed result to be mistaken. FDR estimates should accompany observed results to help the user contextualize the relevance and potential impact of findings. This paper introduces a new user-friendly R pack-age for estimating FDRs and computing adjusted p-values for FDR control. The roles of these two quantities are often confused in practice and some software packages even report the adjusted p-values as the estimated FDRs. A key contribution of this package is that it distinguishes between these two quantities while also offering a broad array of refined algorithms for estimating them. For example, included are newly augmented methods for estimating the null proportion of findings - an important part of the FDR estimation procedure. The package is broad, encompassing a variety of adjustment methods for FDR estimation and FDR control, and includes plotting functions for easy display of results. Through extensive illustrations, we strongly encourage wider reporting of false discovery rates for observed findings. Copyright:Entities:
Keywords: R Package; adjusted p-value; false discovery rate; multiple comparisons; null proportion estimation
Mesh:
Year: 2021 PMID: 34956625 PMCID: PMC8669776 DOI: 10.12688/f1000research.52999.2
Source DB: PubMed Journal: F1000Res ISSN: 2046-1402
Example with 5 features using the Benjamini-Hochberg adjustment and assuming a two-sided normal distribution.
| Feature | Raw p-value | Z-value | Adjusted p-value | FDR | Lower Bound FDR |
|---|---|---|---|---|---|
| Feature 1 | 0.005 | 2.807 | 0.025 | 0.025 | 0.019 |
| Feature 2 | 0.049 | 1.969 | 0.064 | 0.122 | 0.126 |
| Feature 3 | 0.050 | 1.960 | 0.064 | 0.083 | 0.128 |
| Feature 4 | 0.051 | 1.951 | 0.064 | 0.064 | 0.130 |
| Feature 5 | 0.700 | 0.385 | 0.700 | 0.700 | 0.481 |
Figure 1. Simulated example comparing raw p-values and the threshold of interest.
Figure 2. Magnified section of Figure 1.
Figure 3. Density histogram of the simulated example.
Figure 4. FDR simulated Z-values plot.
Figure 5. Simulated histogram of p-values with horizontal line at the last bin height.
Figure 6. Comparison of null proportion estimation methods performance.
Figure 7. Comparison of null proportion estimation methods MSE.
Inputs to the p.fdr function taken directly from the R documentation ( Murray, 2020).
| Arguments | Description |
|---|---|
| p values | A numeric vector of raw p-values. |
| z values | A numeric vector of Z-values to be used in pi0 estimation |
| or a string with options “two.sided”, “greater” or “less”. Defaults to “two.sided”. | |
| threshold | A numeric value in the interval [0,1] used in a multiple comparisons |
| hypothesis tests to determine significance from the null. Defaults to 0.05. | |
| adjust.method | A string used to identify the adjustment method. Defaults to
|
| Options are
| |
| BY.corr | A string of either “positive” or “negative” to determine which correlation |
| is used in the BY method. Defaults to
| |
| just.fdr | A Boolean TRUE or FALSE value which output only the FDR vector instead of |
| the list output. Defaults to FALSE. | |
| default.odds | A numeric value determining the ratio of pi1/pi0 used in the computation of |
| single lower bound FDR. Defaults to 1. | |
| estim.method | A string used to determine which method is used to estimate |
| the null proportion or pi0 value. Defaults to set.pi0. | |
| set.pi0 | A numeric value to specify a known or assumed pi0 value in the interval [0,1]. |
| Defaults to 1. Which means the assumption is that all inputted raw p-values come from | |
| the null distribution. | |
| hist.breaks | A numeric or string variable representing how many breaks are used in the pi0 |
| estimation histogram methods. Defaults to “scott”. | |
| ties.method | A string a character string specifying how ties are treated. Options are ”first”, |
| ”last”, ”average”, ”min”, ”max”, or ”random”. Defaults to ”random”. | |
| sort.results | A Boolean TRUE or FALSE value which sorts the output in either increasing or |
| non-increasing order dependent on the FDR vector. Defaults to FALSE. | |
| na.rm | A Boolean TRUE or FALSE value indicating whether NA’s should be removed from |
| the inputted raw p-value vector before further computation. Defaults to TRUE. |
Figure 8. Example of output produced with p.fdr code.
Inputs for the get.pi0 function taken directly from the R documentation ( Murray, 2020).
| Arguments | Description |
|---|---|
| p values | A numeric vector of raw p-values. |
| set.pi0 | A numeric value to specify a known or assumed pi0 value in the interval [0,1]. |
| Defaults to 1. Which means the assumption is that all inputted raw p-values come from | |
| the null distribution. | |
| estim.method | A string used to determine which method is used to estimate |
| the null proportion or pi0 value. Defaults to set.pi0. | |
| z values | A numeric vector of Z-values to be used in pi0 estimation |
| or a string with options “two.sided”, “greater” or “less”. Defaults to “two.sided”. | |
| threshold | A numeric value in the interval [0,1] used in a multiple comparisons |
| hypothesis tests to determine significance from the null. Defaults to 0.05. | |
| default.odds | A numeric value determining the ratio of pi1/pi0 used in the computation of |
| single lower bound FDR. Defaults to 1. | |
| hist.breaks | A numeric or string variable representing how many breaks are used in the pi0 |
| estimation histogram methods. Defaults to “scott”. | |
| na.rm | A Boolean TRUE or FALSE value indicating whether NA’s should be removed from |
| the inputted raw p-value vector before further computation. Defaults to TRUE. |
Inputs for the plot.p.fdr function taken directly from the R documentation ( Murray, 2020).
| Arguments | Description |
|---|---|
| p.fdr.object | A p.fdr object that contains the list of output. |
| raw.pvalues | A Boolean TRUE or FALSE value to indicate whether or not to plot the raw p-value |
| points. Defaults to TRUE. | |
| adj.pvalues | A Boolean TRUE or FALSE value to indicate whether or not to plot the adjusted |
| p-value points. Defaults to TRUE. | |
| sig.line | A Boolean TRUE or FALSE value to indicate whether or not to plot the raw p-value |
| significance line. Defaults to TRUE. | |
| adj.sig.line | A Boolean TRUE or FALSE value to indicate whether or not to plot the adjusted |
| significance threshold. Defaults to TRUE. | |
| threshold | A numeric value in the interval [0,1] used in a multiple comparisons |
| hypothesis tests to determine significance from the null. Defaults to 0.05. | |
| x.axis | A string variable to indicate what to plot on the x-axis. Can either be “Rank” or |
| “Zvalues”. Defaults to “Rank”. | |
| xlim | A numeric interval for x-axis limits. |
| ylim | A numeric interval for y-axis limits. Defaults to c(0,1). |
| zvalues | A numeric vector of Z-values to be used in pi0 estimation |
| or a string with options “two.sided”, “greater” or “less”. Defaults to “two.sided”. | |
| legend.where | A string “bottomright”, “bottomleft”, “topleft”, “topright”. Defaults to “topleft” |
| is x.axis=”Rank” and “topright” if x.axis=”Zvalues”. | |
| main | A string variable for the title of the plot. |
| pch.adj.p | A plotting ‘character’, or symbol to use for the adjusted p-value points. This can |
| either be a single character or an integer code for one of a set of graphics symbols. | |
| Defaults to 17. | |
| pch.raw.p | A plotting ‘character’, or symbol to use for the raw p-value points. This can either |
| be a single character or an integer code for one of a set of graphics symbols. | |
| Defaults to 20. | |
| pch.adj.fdr | A plotting ‘character’, or symbol to use for the adjusted FDR points. This can |
| either be a single character or an integer code for one of a set of graphics symbols. | |
| Defaults to 20. | |
| col | A vector of colors for the points and lines in the plot. If the input has 1 value all |
| points and lines will be that same color. If the input has length of 3 then | |
| col.adj.fdr will be the first value, col.adj.p will be the second, and col.raw.p is the third. | |
| Defaults to c(”dodgerblue”,”firebrick2”, ”black”). |
Figure 9. Benjamini-Hochberg p.fdr plot.
Figure 10. Magnified section of Figure 9.