statsmodels.stats.multitest.NullDistribution

class statsmodels.stats.multitest.NullDistribution(zscores, null_lb=-1, null_ub=1, estimate_mean=True, estimate_scale=True, estimate_null_proportion=False)[source]

Estimate a Gaussian distribution for the null Z-scores.

The observed Z-scores consist of both null and non-null values. The fitted distribution of null Z-scores is Gaussian, but may have non-zero mean and/or non-unit scale.

Parameters
zscoresarray-like

The observed Z-scores.

null_lbfloat

Z-scores between null_lb and null_ub are all considered to be true null hypotheses.

null_ubfloat

See null_lb.

estimate_meanbool

If True, estimate the mean of the distribution. If False, the mean is fixed at zero.

estimate_scalebool

If True, estimate the scale of the distribution. If False, the scale parameter is fixed at 1.

estimate_null_proportionbool

If True, estimate the proportion of true null hypotheses (i.e. the proportion of z-scores with expected value zero). If False, this parameter is fixed at 1.

Notes

See also:

http://nipy.org/nipy/labs/enn.html#nipy.algorithms.statistics.empirical_pvalue.NormalEmpiricalNull.fdr

References

B Efron (2008). Microarrays, Empirical Bayes, and the Two-Groups Model. Statistical Science 23:1, 1-22.

Attributes
meanfloat

The estimated mean of the empirical null distribution

sdfloat

The estimated standard deviation of the empirical null distribution

null_proportionfloat

The estimated proportion of true null hypotheses among all hypotheses

Methods

pdf(zscores)

Evaluates the fitted emirical null Z-score density.