Summarize systematic prevalence evaluation results and recommend a threshold
Source:R/gfc_flow.R
summarize.prev.eval.RdSummarize systematic prevalence evaluation results and recommend a threshold
Usage
summarize.prev.eval(
results,
unstable.delta.nsig = 8L,
unstable.frac.nsig = 0.5,
stable.window = 2L,
stable.max.delta.nsig = 4L,
b.min.features = 30L,
b.min.sig = 5L,
c.target.features = 35L,
c.min.sig = 5L,
avoid.unstable = TRUE
)Arguments
- results
A results object returned by basin.prev.eval(). Must contain a data.frame
results$summarywith columns: prevalence, nFeatures, nSig, and (optionally) medianAbsLogFC.- unstable.delta.nsig
Integer; flag an "unstable" step if the absolute change in nSig between adjacent prevalence thresholds is >= this value.
- unstable.frac.nsig
Numeric in \([0,1]\); alternative instability criterion: flag if abs(delta.nSig) >= unstable.frac.nsig * max(nSig.prev, nSig.next). Either criterion triggers a flag.
- stable.window
Integer; window size (number of adjacent steps) used by Rule A (stability-first) to check local stability.
- stable.max.delta.nsig
Integer; for Rule A, require that abs(delta.nSig) is <= this value across the next
stable.windowsteps.- b.min.features
Integer; for Rule B, only consider thresholds with nFeatures >= this value.
- b.min.sig
Integer; for Rule B, only consider thresholds with nSig >= this value.
- c.target.features
Integer; for Rule C, aim for approximately this many retained features (interpretability-first).
- c.min.sig
Integer; for Rule C, require at least this many discoveries.
- avoid.unstable
Logical; if TRUE, avoid selecting thresholds that are adjacent to unstable jumps.
Value
A list with:
summary.aug: results$summary augmented with sig.rate and deltas
unstable.steps: integer indices of steps flagged as unstable (between i-1 and i)
unstable.prevalence: prevalence values at the right end of unstable steps
recommend: list with rule.a, rule.b, rule.c recommended prevalence values
recommend.idx: corresponding row indices in summary.aug