Inheritance diagram for nipy.labs.group.permutation_test:
One and two sample permutation tests.
Bases: object
This generic permutation test class contains the calibration method which is common to the derived classes permutation_test_onesample and permutation_test_twosample (as well as other common methods)
Methods
calibrate([nperms, clusters, cluster_stats, ...]) | Calibrate cluster and region summary statistics using permutation test |
height_threshold(pval) | Return the uniform height threshold matching a given |
pvalue([Tvalues]) | Return uncorrected voxel-level pseudo p-values. |
zscore([Tvalues]) | Return z score corresponding to the uncorrected |
x.__init__(...) initializes x; see help(type(x)) for signature
Calibrate cluster and region summary statistics using permutation test
Parameters: | nperms : int, optional
clusters : list [(thresh1,diam1),(thresh2,diam2),...], optional
cluster_stats : list [stat1,...], optional
regions : list [Labels1,Labels2,...]
region_stats : list [stat1,...], optional
verbose : boolean, optional
|
---|---|
Returns: | voxel_results : dict
cluster_results : list [results1,results2,...]
region_results :list [results1,results2,...] :
|
Return the uniform height threshold matching a given permutation-based P-value.
Return uncorrected voxel-level pseudo p-values.
Return z score corresponding to the uncorrected voxel-level pseudo p-value.
Bases: nipy.labs.group.permutation_test.permutation_test
Class derived from the generic permutation_test class. Inherits the calibrate method
Methods
calibrate([nperms, clusters, cluster_stats, ...]) | Calibrate cluster and region summary statistics using permutation test |
height_threshold(pval) | Return the uniform height threshold matching a given |
pvalue([Tvalues]) | Return uncorrected voxel-level pseudo p-values. |
zscore([Tvalues]) | Return z score corresponding to the uncorrected |
Initialize permutation_test_onesample instance, compute statistic values in each voxel and under permutation In: data data array
- XYZ voxels coordinates
- axis <int> Subject axis in data
- vardata variance (same shape as data)
- optional (if None, mfx statistics cannot be used)
- stat_id <char> choice of test statistic
- (see onesample.stats for a list of possible stats)
base <float> mean signal under H0 niter <int> number of iterations of EM algorithm ndraws <int> Number of generated random t values
self.Tvalues voxelwise test statistic values self.random_Tvalues sorted statistic values in random voxels and under random
sign permutation
Calibrate cluster and region summary statistics using permutation test
Parameters: | nperms : int, optional
clusters : list [(thresh1,diam1),(thresh2,diam2),...], optional
cluster_stats : list [stat1,...], optional
regions : list [Labels1,Labels2,...]
region_stats : list [stat1,...], optional
verbose : boolean, optional
|
---|---|
Returns: | voxel_results : dict
cluster_results : list [results1,results2,...]
region_results :list [results1,results2,...] :
|
Return the uniform height threshold matching a given permutation-based P-value.
Return uncorrected voxel-level pseudo p-values.
Return z score corresponding to the uncorrected voxel-level pseudo p-value.
Bases: nipy.labs.group.permutation_test.permutation_test
Class derived from the generic permutation_test class. Inherits the calibrate method
Methods
calibrate([nperms, clusters, cluster_stats, ...]) | Calibrate cluster and region summary statistics using permutation test |
height_threshold(pval) | Return the uniform height threshold matching a given |
pvalue([Tvalues]) | Return uncorrected voxel-level pseudo p-values. |
zscore([Tvalues]) | Return z score corresponding to the uncorrected |
Initialize permutation_test_onesample instance, compute statistic values in each voxel and under permutation In: data data array
G weighted graph (each vertex corresponds to a voxel) axis <int> Subject axis in data vardata variance (same shape as data)
optional (if None, mfx statistics cannot be used)
- stat_id <char> choice of test statistic
- (see onesample.stats for a list of possible stats)
base <float> mean signal under H0 niter <int> number of iterations of EM algorithm ndraws <int> Number of generated random t values
self.Tvalues voxelwise test statistic values self.random_Tvalues sorted statistic values in random voxels and under random
sign permutation
Calibrate cluster and region summary statistics using permutation test
Parameters: | nperms : int, optional
clusters : list [(thresh1,diam1),(thresh2,diam2),...], optional
cluster_stats : list [stat1,...], optional
regions : list [Labels1,Labels2,...]
region_stats : list [stat1,...], optional
verbose : boolean, optional
|
---|---|
Returns: | voxel_results : dict
cluster_results : list [results1,results2,...]
region_results :list [results1,results2,...] :
|
Return the uniform height threshold matching a given permutation-based P-value.
Return uncorrected voxel-level pseudo p-values.
Return z score corresponding to the uncorrected voxel-level pseudo p-value.
Bases: nipy.labs.group.permutation_test.permutation_test
Class derived from the generic permutation_test class. Inherits the calibrate method
Methods
calibrate([nperms, clusters, cluster_stats, ...]) | Calibrate cluster and region summary statistics using permutation test |
height_threshold(pval) | Return the uniform height threshold matching a given |
pvalue([Tvalues]) | Return uncorrected voxel-level pseudo p-values. |
zscore([Tvalues]) | Return z score corresponding to the uncorrected |
Initialize permutation_test_twosample instance, compute statistic values in each voxel and under permutation In: data1, data2 data arrays
- XYZ voxels coordinates
- axis <int> Subject axis in data
- vardata1, vardata2 variance (same shape as data)
- optional (if None, mfx statistics cannot be used)
- stat_id <char> choice of test statistic
- (see onesample.stats for a list of possible stats)
niter <int> number of iterations of EM algorithm ndraws <int> Number of generated random t values
self.Tvalues voxelwise test statistic values self.random_Tvalues sorted statistic values in random voxels and under random
sign permutation
Calibrate cluster and region summary statistics using permutation test
Parameters: | nperms : int, optional
clusters : list [(thresh1,diam1),(thresh2,diam2),...], optional
cluster_stats : list [stat1,...], optional
regions : list [Labels1,Labels2,...]
region_stats : list [stat1,...], optional
verbose : boolean, optional
|
---|---|
Returns: | voxel_results : dict
cluster_results : list [results1,results2,...]
region_results :list [results1,results2,...] :
|
Return the uniform height threshold matching a given permutation-based P-value.
Return uncorrected voxel-level pseudo p-values.
Return z score corresponding to the uncorrected voxel-level pseudo p-value.
size_values, Fisher_values = compute_cluster_stats(Tvalues, labels, random_Tvalues, cluster_stats=[“size”,”Fisher”]) Compute summary statistics in each cluster In: see permutation_test_onesample class docstring Out: size_values Array of size nclust, or None if “size” not in cluster_stats
Fisher_values Array of size nclust, or None if “Fisher” not in cluster_stats
Fisher_values = compute_region_stat(Tvalues, labels, label_values, random_Tvalues) Compute summary statistics in each cluster In: see permutation_test_onesample class docstring Out: Fisher_values Array of size nregions
Extract clusters from a statistical map under diameter constraint and above given threshold In: T (p) statistical map
XYZ (3,p) voxels coordinates th <float> minimum threshold diam <int> maximal diameter (in voxels) k <int> the number of neighbours considered. (6,18 or 26)
Out: labels (p) cluster labels
Comment by alexis-roche, September 15th 2012: this function was originally developed by Merlin Keller in an attempt to generalize classical cluster-level analysis by subdividing clusters in blobs with limited diameter (at least, this is my understanding). This piece of code seems to have remained very experimental and its usefulness in real-world neuroimaging image studies is still to be demonstrated.
This returns a label vector of same size as T, defining connected components for subgraph of weighted graph G containing vertices s.t. T >= th
Extract clusters from statistical map above specified threshold In: T (p) statistical map
XYZ (3,p) voxels coordinates th <float> threshold k <int> the number of neighbours considered. (6,18 or 26)
Out: labels (p) cluster labels
Maximum distance between two set of points In: XYZ (3,p) voxels coordinates
I (q) index of points J (r) index of points
Out: d <float>
Wrapper for os_stat and os_stat_mfx
Returns (3, n_labels) array of maximum T values coordinates for each label value
Extract list of distinct sortedvalues from an array
Wrapper for ts_stat and ts_stat_mfx