![]() |
OpenMS
|
Statistical functions for multiple testing correction. More...
#include <OpenMS/MATH/STATISTICS/MultipleTesting.h>
Public Types | |
| enum class | Pi0Method { Smoother , Bootstrap } |
| Method for estimating proportion of true null hypotheses (pi0) More... | |
| enum class | LfdrTransform { Probit , Logit } |
| Transformation for local FDR estimation. More... | |
Static Public Member Functions | |
| static std::string | pi0MethodToString (Pi0Method m) |
| Convert Pi0Method enum to string representation. | |
| static Pi0Method | toPi0Method (const std::string &s) |
| Convert string to Pi0Method enum (throws if invalid) | |
| static std::string | lfdrTransformToString (LfdrTransform t) |
| Convert LfdrTransform enum to string representation. | |
| static LfdrTransform | toLfdrTransform (const std::string &s) |
| Convert string to LfdrTransform enum (throws if invalid) | |
| static std::vector< double > | qValue (const std::vector< double > &p_values, double pi0, bool pfdr=false) |
| Calculate q-values (FDR-adjusted p-values) for multiple testing correction. | |
| static Pi0Result | pi0Est (const std::vector< double > &p_values, const std::vector< double > &lambda_=std::vector< double >(), Pi0Method method=Pi0Method::Smoother, int smooth_df=3, bool smooth_log_pi0=false) |
| Estimate the proportion of true null hypotheses (pi0). | |
| static std::vector< double > | lfdr (const std::vector< double > &p_values, double pi0, bool trunc=true, bool monotone=true, LfdrTransform transf=LfdrTransform::Probit, double adj=1.5, double eps=1e-8, std::size_t gridsize=512, double cut=3.0) |
| Estimate local false discovery rate (local FDR) from p-values. | |
| static std::vector< double > | pNorm (const std::vector< double > &stat, const std::vector< double > &stat0) |
| Compute tail probabilities under a fitted normal distribution. | |
| template<class T > | |
| static std::vector< double > | computeModelFDR (const std::vector< T > &data_in) |
| Compute model-based FDR estimates from posterior error probabilities. | |
| template<class T > | |
| static std::vector< double > | pEmp (const std::vector< T > &stat, const std::vector< T > &stat0) |
| Compute empirical p-values from test statistics and null distribution. | |
Statistical functions for multiple testing correction.
Provides FDR estimation, q-value calculation, and local FDR computation based on the Storey-Tibshirani method. This struct contains static methods and enum classes for the various multiple testing correction procedures.
References:
|
strong |
|
strong |
|
inlinestatic |
Compute model-based FDR estimates from posterior error probabilities.
| data_in | Vector of posterior error probabilities (PEPs) |
References RankData::Max, and RankData::Propagate.
Referenced by OpenMS::Math::computeModelFDR().
|
static |
Estimate local false discovery rate (local FDR) from p-values.
| p_values | Vector of p-values from hypothesis tests |
| pi0 | Estimated proportion of true null hypotheses |
| trunc | If true, truncate lfdr values to [0,1] range (default true) |
| monotone | If true, enforce monotonicity constraint (default true) |
| transf | Transformation to apply: Probit (default) or Logit |
| adj | Bandwidth adjustment factor (default 1.5) |
| eps | Small constant to avoid division by zero (default 1e-8) |
| gridsize | Number of FFT grid points for KDE (default 512) |
| cut | Grid extension factor in units of bandwidth (default 3.0) |
|
static |
Convert LfdrTransform enum to string representation.
|
inlinestatic |
Compute empirical p-values from test statistics and null distribution.
| stat | Vector of observed test statistics |
| stat0 | Vector of null test statistics |
References RankData::Average, and RankData::Propagate.
Referenced by OpenMS::Math::pEmp().
|
static |
Estimate the proportion of true null hypotheses (pi0).
| p_values | Vector of p-values from hypothesis tests (range [0,1]) |
| lambda_ | Vector of lambda threshold values for estimation. If empty, defaults to seq(0.05, 0.95, 0.05). |
| method | Method for pi0 estimation: Smoother (default) or Bootstrap |
| smooth_df | Degrees of freedom for smoothing spline (default: 3) |
| smooth_log_pi0 | If true, perform smoothing in log-space (default: false) |
|
static |
Convert Pi0Method enum to string representation.
|
static |
Compute tail probabilities under a fitted normal distribution.
| stat | Vector of test statistics |
| stat0 | Vector of null statistics used to estimate N(mu, sigma^2) |
References OpenMS::Math::computeModelFDR(), and OpenMS::Math::pEmp().
Referenced by OpenMS::Math::pNorm().
|
static |
Calculate q-values (FDR-adjusted p-values) for multiple testing correction.
Converts p-values to q-values using the Storey-Tibshirani method. A q-value is the minimum FDR at which a test is called significant.
| p_values | Vector of p-values to be adjusted (must be in range [0,1]) |
| pi0 | Proportion of true null hypotheses (typically estimated by pi0Est()) |
| pfdr | If true, compute positive FDR; if false (default), compute regular FDR |
Referenced by OpenMS::Math::qValue().
|
static |
Convert string to LfdrTransform enum (throws if invalid)
|
static |
Convert string to Pi0Method enum (throws if invalid)