pymare.estimators.FisherCombinationTest

class FisherCombinationTest(mode='directed')[source]

Bases: CombinationTest

Fisher’s method for combining p-values.

Takes a set of independent z-scores and combines them via Fisher’s [1] method to produce a fixed-effect estimate of the combined effect.

Parameters:

mode ({"directed", "undirected", "concordant"}, optional) –

The type of test to perform– i.e., what null hypothesis to reject. See Winkler et al.[2] for details. Valid options are:

  • ’directed’: tests a directional hypothesis–i.e., that the observed value is consistently greater than 0 in the input studies. This is the default.

  • ’undirected’: tests an undirected hypothesis–i.e., that the observed value differs from 0 in the input studies, but allowing the direction of the deviation to vary by study.

  • ’concordant’: equivalent to two directed tests, one for each sign, with correction for 2 tests.

Notes

  1. All input z-scores are assumed to correspond to one-sided p-values. Do NOT pass in z-scores that have been directly converted from two-tailed p-values, as these do not preserve directional information.

  2. The ‘directed’ and ‘undirected’ modes are NOT the same as one-tailed and two-tailed tests. In general, users who want to test directed hypotheses should use the ‘directed’ mode, and users who want to test for consistent effects in either the positive or negative direction should use the ‘concordant’ mode. The ‘undirected’ mode tests a fairly uncommon null that doesn’t constrain the sign of effects to be consistent across studies (one can think of it as a test of extremity). In the vast majority of meta-analysis applications, this mode is not appropriate, and users should instead opt for ‘directed’ or ‘concordant’.

  3. This estimator does not support meta-regression; any moderators passed in to fit() as the X array will be ignored.

References

fit(z, *args, **kwargs)[source]

Fit the estimator to z-values.

fit_dataset(dataset, *args, **kwargs)[source]

Apply the current estimator to the passed Dataset container.

A convenience interface that wraps fit() and automatically aligns the variables held in a Dataset with the required arguments.

Parameters:
  • dataset (Dataset) – A PyMARE Dataset instance holding the data.

  • *args – Optional positional arguments to pass onto the fit() method.

  • **kwargs – Optional keyword arguments to pass onto the fit() method.

get_v(dataset)[source]

Get the variances, or an estimate thereof, from the given Dataset.

Parameters:

dataset (Dataset) – The dataset to use to retrieve/estimate v.

Returns:

2-dimensional array of variances/variance estimates.

Return type:

numpy.ndarray

Notes

This is equivalent to directly accessing dataset.v when variances are present, but affords a way of estimating v from sample size (n) for any estimator that implicitly estimates a sigma^2 parameter.

p_value(z)[source]

Calculate p-values.

summary()[source]

Generate a summary of the estimator results.

Examples using pymare.estimators.FisherCombinationTest

Run Estimators on a simulated dataset

Run Estimators on a simulated dataset