nimare.meta.ibma.PermutedOLS

class PermutedOLS(two_sided=True, *args, **kwargs)[source]

Bases: nimare.base.MetaEstimator

An analysis with permuted ordinary least squares (OLS), using nilearn.

Changed in version 0.0.8:

  • [FIX] Remove single-dimensional entries of each array of returns (dict).

New in version 0.0.4.

Parameters

two_sided (bool, optional) – If True, performs an unsigned t-test. Both positive and negative effects are considered; the null hypothesis is that the effect is zero. If False, only positive effects are considered as relevant. The null hypothesis is that the effect is zero or negative. Default is True.

Notes

Requires z images.

Available correction methods: PermutedOLS.correct_fwe_montecarlo()

Warning

All image-based meta-analysis estimators adopt an aggressive masking strategy, in which any voxels with a value of zero in any of the input maps will be removed from the analysis.

References

  • Freedman, D., & Lane, D. (1983). A nonstochastic interpretation of reported significance levels. Journal of Business & Economic Statistics, 1(4), 292-298.

See also

nilearn.mass_univariate.permuted_ols

The function used for this IBMA.

correct_fwe_montecarlo(result, n_iters=10000, n_cores=- 1)[source]

Perform FWE correction using the max-value permutation method.

Changed in version 0.0.8:

  • [FIX] Remove single-dimensional entries of each array of returns (dict).

New in version 0.0.4.

Only call this method from within a Corrector.

Parameters
  • result (nimare.results.MetaResult) – Result object from an ALE meta-analysis.

  • n_iters (int, optional) – The number of iterations to run in estimating the null distribution. Default is 10000.

  • n_cores (int, optional) – Number of cores to use for parallelization. If <=0, defaults to using all available cores. Default is -1.

Returns

images (dict) – Dictionary of 1D arrays corresponding to masked images generated by the correction procedure. The following arrays are generated by this method: ‘z_vthresh’, ‘p_level-voxel’, ‘z_level-voxel’, and ‘logp_level-cluster’.

See also

nimare.correct.FWECorrector

The Corrector from which to call this method.

nilearn.mass_univariate.permuted_ols

The function used for this IBMA.

Examples

>>> meta = PermutedOLS()
>>> result = meta.fit(dset)
>>> corrector = FWECorrector(method='montecarlo',
                             n_iters=5, n_cores=1)
>>> cresult = corrector.transform(result)
fit(dataset, drop_invalid=True)[source]

Fit Estimator to Dataset.

Parameters
  • dataset (nimare.dataset.Dataset) – Dataset object to analyze.

  • drop_invalid (bool, optional) – Whether to automatically ignore any studies without the required data or not. Default is False.

Returns

nimare.results.MetaResult – Results of Estimator fitting.

Variables

inputs_ (dict) – Inputs used in _fit.

Notes

The fit method is a light wrapper that runs input validation and preprocessing before fitting the actual model. Estimators’ individual “fitting” methods are implemented as _fit, although users should call fit.

get_params(deep=True)[source]

Get parameters for this estimator.

Parameters

deep (bool, optional) – If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns

params (dict) – Parameter names mapped to their values.

classmethod load(filename, compressed=True)[source]

Load a pickled class instance from file.

Parameters
  • filename (str) – Name of file containing object.

  • compressed (bool, optional) – If True, the file is assumed to be compressed and gzip will be used to load it. Otherwise, it will assume that the file is not compressed. Default = True.

Returns

obj (class object) – Loaded class object.

save(filename, compress=True)[source]

Pickle the class instance to the provided file.

Parameters
  • filename (str) – File to which object will be saved.

  • compress (bool, optional) – If True, the file will be compressed with gzip. Otherwise, the uncompressed version will be saved. Default = True.

set_params(**params)[source]

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Returns

self

Examples using nimare.meta.ibma.PermutedOLS