API

pymare.core: Core objects

Core classes and functions.

core.Dataset([y, v, X, n, data, X_names, ...])

Container for input data and arguments to estimators.

core.meta_regression([y, v, X, n, data, ...])

Fit the standard meta-regression/meta-analysis model to provided data.

pymare.estimators: Meta-analytic algorithms

Estimators for meta-analyses and meta-regressions.

estimators.WeightedLeastSquares([tau2, ...])

Weighted least-squares meta-regression.

estimators.DerSimonianLaird([weight_scheme, ...])

DerSimonian-Laird meta-regression estimator.

estimators.VarianceBasedLikelihoodEstimator([...])

Likelihood-based estimator for estimates with known variances.

estimators.SampleSizeBasedLikelihoodEstimator([...])

Likelihood-based estimator for data with known sample sizes but unknown sampling variances.

estimators.StanMetaRegression([tau_prior_scale])

Bayesian meta-regression estimator using Stan.

estimators.Hedges([weight_scheme, rho, ...])

Hedges meta-regression estimator.

estimators.StoufferCombinationTest([mode, ...])

Stouffer's Z-score meta-analysis method.

estimators.FisherCombinationTest([mode])

Fisher's method for combining p-values.

estimators.estimators.BaseEstimator()

A base class for Estimators.

pymare.results: Meta-analytic results

Tools for representing and manipulating meta-regression results.

results.MetaRegressionResults(estimator, ...)

Container for results generated by PyMARE meta-regression estimators.

results.CombinationTestResults(estimator, ...)

Container for results generated by p-value combination methods.

results.PermutationTestResults(results, ...)

Lightweight container to hold and display permutation test results.

results.BayesianMetaRegressionResults(data, ...)

Container for MCMC sampling-based PyMARE meta-regression estimators.

pymare.effectsize: Effect size computation/conversion

Tools for converting between effect-size measures.

effectsize.OneSampleEffectSizeConverter([...])

Effect size converter for metric involving a single group/set of scores.

effectsize.TwoSampleEffectSizeConverter([...])

Effect size converter for two-sample comparisons.

effectsize.Expression(expression[, ...])

Represent a single statistical expression.

effectsize.solve_system(system[, known_vars])

Solve and evaluate a system of SymPy equations given known inputs.

effectsize.select_expressions(target, known_vars)

Select a minimal system of expressions needed to solve for the target.

effectsize.compute_measure(measure[, data, ...])

Auto-detect and apply the right converter class.

pymare.stats: Miscellaneous statistical functions

Miscellaneous statistical functions.

Vocabulary

A group is the unit of dependence: rows sharing a label in g came from one sampling unit and are not independent of each other. That is the word used throughout for the unit itself, and it matches the g/groups arguments.

The word cluster is retained only where it is the established term for a method rather than a description of the data – “cluster-robust variance estimation”, cluster_robust_cov(), MIN_CLUSTERS_FOR_RVE, and the CR0/CR2 family. Those names tie the code to its own citations and are not renamed. A group and a cluster are the same thing; only the provenance of the word differs.

stats.weighted_least_squares(y, v, X[, ...])

Perform 2-D weighted least squares.

stats.knapp_hartung_cov_and_dof(y, v, X, ...)

Apply the Knapp-Hartung adjustment to a model-based covariance.

stats.bounded_scalar_min(f, lower, upper[, ...])

Minimize a scalar function over a bounded interval for many datasets at once.

stats.ensure_2d(arr)

Ensure the passed array has 2 dimensions.

stats.q_profile(y, v, X[, alpha, groups])

Get the CI for tau^2 via the Q-Profile method.

stats.q_gen(y, v, X, tau2[, groups])

Calculate a generalized form of Cochran's Q-statistic.

stats.log_chi2_sf(q, df)

Natural logarithm of the chi-squared upper tail, without underflowing.

stats.bonferroni(p_values)

Perform Bonferroni correction on p values.

stats.fdr(p_values[, q, method])

Perform FDR correction on p values.

pymare.datasets: Meta-analytic datasets

Open meta-analytic datasets.

datasets.michael2013()

Load a dataset of studies on the persuasive power of a brain image.

pymare.utils: Miscellaneous utility functions

Miscellaneous utility functions.

utils.get_resource_path()

Return the path to general resources, terminated with separator.