Calculate local FDR values for a list of Z-scores.
Parameters: | zscores : array-like
null_proportion : float
null_pdf : function mapping reals to positive reals
deg : integer
nbins : integer
|
---|---|
Returns: | fdr : array-like
|
References
B Efron (2008). Microarrays, Empirical Bayes, and the Two-Groups Model. Statistical Science 23:1, 1-22.
Examples
Basic use (the null Z-scores are taken to be standard normal):
>>> from statsmodels.stats.multitest import local_fdr
>>> import numpy as np
>>> zscores = np.random.randn(30)
>>> fdr = local_fdr(zscores)
Use a Gaussian null distribution estimated from the data:
>>> null = EmpiricalNull(zscores)
>>> fdr = local_fdr(zscores, null_pdf=null.pdf)