controlBayesFdr: FDR

View source: R/stats.R

controlBayesFdrR Documentation

FDR

Description

Call significant tests by controlling the Bayesian FDR via the procedure from Newton et al (Biostatistics, 2004) also described in Muller et al (JASA, 2006).

Usage

controlBayesFdr(log10.bfs, pi0, fdr.level = 0.05, verbose = 1)

Arguments

log10.bfs

vector containing the log10(BF) of each test

pi0

estimate of the proba for a null hypothesis to be true

fdr.level

threshold below which a null is rejected

verbose

verbosity level (0/1)

Value

logical vector with TRUE if null is rejected (thus called significant)

Author(s)

Timothee Flutre

See Also

estimatePi0WithEbf, estimatePi0WithQbf

Examples

## Not run: set.seed(1859)
log10.bfs <- rgamma(n=1000, shape=0.5, rate=1) - 0.5 # fake but looks realistic
pi0 <- estimatePi0WithEbf(log10.bfs)
signif <- controlBayesFdr(log10.bfs, pi0)

## End(Not run)

timflutre/rutilstimflutre documentation built on Feb. 12, 2025, 11:35 p.m.