statFDR: Calculate FDR for a given number of test runs

View source: R/statFDR.R

statFDRR Documentation

Calculate FDR for a given number of test runs

Description

this function calculates the False Discovery Rate for a statistical test based on its sensitivity, the assumed prevalence of the effect and the specificity of the test.

Usage

statFDR(n, prevalence = 0.1, sensitivity = 0.8, p.val = 0.05)

Arguments

n

the number of tests (e.g. the number of pixels for pixel-wise calculations)

prevalence

the fraction of real effects present (this is a guess!!)

sensitivity

the sensitivity of the test, i.e. how likely it is that the test will discover an effect if there is one

p.val

the p-value to be acceptable

Author(s)

Tim Appelhans

References

Review article: An investigation of the false discovery rate and the misinterpretation of p-values

David Colquhoun R. Soc. open sci. 2014 1 140216; DOI: 10.1098/rsos.140216. Published 19 November 2014

Examples

## reproducing Figure 1 from \url{http://rsos.royalsocietypublishing.org/content/1/3/140216}
n <- 10000
prev <- 0.01
sens <- 0.8
p_val <- 0.05

statFDR(n, prev, sens, p_val)



environmentalinformatics-marburg/Rsenal documentation built on July 28, 2023, 6:09 a.m.