Inheritance diagram for nipy.neurospin.utils.emp_null:
this module contains a class that fits a gaussian model to the central part of an histogram, following schwartzman et al, 2009. This is typically necessary to estimate a fdr when one is not certain that the data behaves as a standard normal under H_0.
Author : Bertrand Thirion, 2008-2009
Class to compute the empirical null normal fit to the data.
The data which is used to estimate the FDR, assuming a gaussian null from Schwartzmann et al., NeuroImage 44 (2009) 71–82
Initiate an empirical null normal object.
Parameters: | x : 1D ndarray
|
---|
Estimate the proportion, mean and variance of a gaussian distribution for a fraction of the data
Parameters: | left : float, optional
right : float, optional
|
---|
Notes
plot the histogram of x
Parameters: | efp : float, optional
alpha : float, optional
|
---|
Compute the threshold correponding to an alpha-level fdr for x
Parameters: | alpha : float, optional
verbose : boolean, optional
|
---|
Compute the threshold correponding to a specificity alpha for x
Parameters: | alpha : float, optional
verbose : boolean, optional
Results : theta: float :
|
---|
This is the basic class to handle false discovery rate computation parameter: fdr.x the samples from which the fdr is derived x is assumed to be a normal variate
The Benjamini-Horchberg procedure is used
Returns all the FDR (false discovery rates) values for the sample x
Parameters: | x : ndarray of shape (n)
|
---|
Returns the fdr associated with each the values
Parameters: | pv : ndarray of shape (n)
|
---|---|
Returns: | q : array of shape(n)
|
Do some basic checks on the pv array: each value should be within [0,1]
Parameters: | pv : array of shape (n)
|
---|---|
Returns: | pv : array of shape (n)
|
Given a set pv of p-values, returns the critical p-value associated with an FDR alpha
Parameters: | alpha : float
pv : array of shape (n)
|
---|---|
Returns: | pth: float :
|
Given an array x of normal variates, this function returns the critical p-value associated with alpha. x is explicitly assumed to be normal distributed under H_0
Parameters: | alpha: float, optional :
x : ndarray, optional
|
---|---|
Returns: | th : float
|
Given an array t of student variates with df dofs, returns the critical p-value associated with alpha.
Parameters: | df : float
alpha : float, optional
x : ndarray, optional
|
---|---|
Returns: | th : float
|