statsmodels.stats.meta_analysis.combine_effects#

statsmodels.stats.meta_analysis.combine_effects(effect, variance, method_re='iterated', row_names=None, use_t=False, alpha=0.05, **kwds)[source]#

Combining effect sizes for effect sizes using meta-analysis

Lists and tuples are converted to arrays, arrays and pandas objects are used as they are.

Parameters:
effectarray_like

Mean of effect size measure for all samples.

variancearray_like

Variance of mean or effect size measure for all samples.

method_re{“iterated”, “pm”, “chi2”, “dl”}, optional

Method that is used to compute the between random effects variance. “iterated” or “pm” uses Paule and Mandel method to iteratively estimate the random effects variance. Options for the iteration can be provided in the kwds. “chi2” or “dl” uses DerSimonian and Laird one-step estimator.

row_nameslist of str, optional

Names for samples or studies, will be included in results summary and table.

use_tbool, optional

If use_t is False, then confidence intervals and hypothesis tests are based on the normal distribution. If use_t is True, then the results instance stores this choice as its use_t attribute and it is used when computing confidence intervals with the t-distribution.

alphafloat in (0, 1), optional

Significance level, default is 0.05, for the confidence intervals.

**kwds

Additional keyword arguments passed to the function that estimates the random effects variance if method_re is “iterated” or “pm”.

Returns:
resultsCombineResults

Contains estimation results and intermediate statistics, and includes a method to return a summary table. Statistics from intermediate calculations might be removed at a later time.

Notes

Status: Basic functionality is verified, mainly compared to R metafor package. However, API might still change.

This computes both fixed effects and random effects estimates. The random effects results depend on the method to estimate the RE variance.

Scale estimate In fixed effects models and in random effects models without fully iterated random effects variance, the model will in general not account for all residual variance. Traditional meta-analysis uses a fixed scale equal to 1, that might not produce test statistics and confidence intervals with the correct size. Estimating the scale to account for residual variance often improves the small sample properties of inference and confidence intervals. This adjustment to the standard errors is often referred to as the HKSJ method, attributed to Hartung and Knapp and Sidik and Jonkman. However, this is equivalent to estimating the scale in WLS. The results instance includes both, fixed scale and estimated scale versions of standard errors and confidence intervals.

The DerSimonian and Laird one-step estimate of the random effects variance tau2 (“chi2” or “dl”) is truncated at zero, as is the Paule and Mandel estimate (“iterated” or “pm”). If the estimate is truncated, then the random effects results are equal to the fixed effects results.

Changed in version 0.15.1: The DerSimonian and Laird estimate of tau2 is truncated at zero. Previously a negative tau2 was used, which could produce a random effects mean outside the range of the effects.

The attributes h2 and i2 of the results are q / (k - 1) and 1 - 1 / h2, where q is the test statistic of the homogeneity test and k is the number of studies. They are floored at their lower bounds, h2 at 1 and i2 at 0, which are the values when tau2 is zero. i2 is a fraction and not a percent.

Changed in version 0.15.1: h2 is at least 1 and i2 is at least 0. Previously h2 was below 1 and i2 was negative (or -inf if q is zero) if q is smaller than k - 1.

References

Borenstein, Michael. 2009. Introduction to Meta-Analysis.

Chichester: Wiley.

Chen, Ding-Geng, and Karl E. Peace. 2013. Applied Meta-Analysis with R.

Chapman & Hall/CRC Biostatistics Series. Boca Raton: CRC Press/Taylor & Francis Group.