escalc {metafor}R Documentation

Calculate Effect Size and Outcome Measures

Description

The function calculates various effect size and outcome measures that are commonly used in meta-analyses. The corresponding sampling variances are also calculated.

Usage

escalc(measure, ai, bi, ci, di, n1i, n2i, m1i, m2i, sd1i, sd2i, 
       xi, mi, ri, ni, data=NULL, add=1/2, to="only0", vtype="LS")

Arguments

measure a character string indicating which effect size or outcome measure should be calculated. See ‘Details’ for possible options and what arguments below should then be specified.
ai vector to specify 2x2 table frequencies (upper left cell).
bi vector to specify 2x2 table frequencies (upper right cell).
ci vector to specify 2x2 table frequencies (lower left cell).
di vector to specify 2x2 table frequencies (lower right cell).
n1i vector to specify group sizes or row total (first group/row).
n2i vector to specify group sizes or row total (second group/row).
m1i vector to specify means (first group).
m2i vector to specify means (second group).
sd1i vector to specify standard deviations (first group).
sd2i vector to specify standard deviations (second group).
xi vector to specify frequencies of the event of interest.
mi vector to specify frequencies of the complement of the event of interest.
ri vector to specify the raw correlation coefficients.
ni vector to specify the sample sizes.
data an optional data frame containing the variables given to the arguments above.
add See ‘Details’.
to See ‘Details’.
vtype See ‘Details’.

Details

Raw and Standardized Mean Difference

The raw mean difference and standardized mean difference are useful effect size measure when meta-analyzing a set of studies comparing two groups (e.g., treatment and control groups) with respect to some quantitative (and ideally normally distributed) dependent variable. For these outcome measures, m1i and m2i denote the means of the two groups, sd1i and sd2i the standard deviations of the scores in the two groups, and n1i and n2i the sample sizes of the two groups.

Effect Size and Outcome Measures for 2x2 Table Data

Studies providing data in terms of 2x2 tables call for other outcome measures. In particular, assume that we have tables of the form:
outcome 1 outcome 2 total
group 1 ai bi n1i
group 2 ci di n2i

where ai, bi, ci, and di denote the cell frequencies and n1i and n2i the row totals. For example, in a set of RCTs, group 1 and group 2 may refer to the treatment and placebo group, with outcome 1 denoting some event of interest and outcome 2 its complement. In a set of case-control studies, group 1 and group 2 may refer to the group of cases and the group of controls, with outcome 1 denoting, for example, exposure to some risk factor and outcome 2 non-exposure. The 2x2 table may also be the result of cross-sectional (i.e., multinomial) sampling, so that none of the table margins (except the total sample size) are fixed through the study design.

Depending on the type of design (sampling method), a meta-analysis of 2x2 table data can be based on one of several different outcome measures, including the odds ratio, the risk ratio (also called relative risk), the risk difference, and the arc-sine transformed risk difference. The phi coefficient, Yule's Q, and Yule's Y are additional measures of association for 2x2 table data (but they may not be the most ideal choices for meta-analyses of such data). For these measures, one needs to supply either ai, bi, ci, and di or alternatively ai, ci, n1i, and n2i. Note that the log is taken of the risk and the odds ratio, which makes these outcome measures symmetric about 0 and helps to make the distribution of these outcome measure closer to normal.

Cell entries with a zero can be problematic, especially for the risk and the odds ratio. Adding a constant to the cells of the 2x2 tables is a common solution to this problem. When to="all", the value of add is added to each cell of the 2x2 tables in all k tables. When to="only0", the value of add is added to each cell of the 2x2 tables only in those tables with at least one cell equal to 0. When to="if0all", the value of add is added to each cell of the 2x2 tables in all k tables, but only when there is at least one 2x2 table with a zero entry. Setting to="none" or add=0 has the same effect: No adjustment to the observed table frequencies is made. Depending on the outcome measure and the data, this may lead to division by zero inside of the function (when this occurs, the resulting Inf value is recoded to NA).

Proportions and Transformations Thereof

When the studies provide data for a single group with respect to a dichotomous dependent variable, then the raw proportion, log transformed proportion, logit transformed proportion (i.e., log odds), the arc-sine transformed proportion, and the Freeman-Tukey double arc-sine transformed proportion are useful outcome measures. Here, one needs to specify xi and ni, denoting the number of individuals experiencing the event of interest and the total number of individuals, respectively. Instead of specifying ni, one can use mi to specify the number of individuals that do not experience the event of interest.

Again, zero cell entries can be problematic. When to="all", the value of add is added to xi and mi in all k studies. When to="only0", the value of add is added only for studies where the xi or mi is equal to 0. When to="if0all", the value of add is added in all k studies, but only when there is at least one study with a zero value for xi or mi. Setting to="none" or add=0 again means that no adjustment to the observed values is made.

Raw and Transformed Correlation Coefficient

Another frequently used outcome measure in meta-analyses is the correlation coefficient. Here, one needs to specify ri, the vector with the raw correlation coefficients, and ni, the corresponding sample sizes.

Value

A data frame with the following elements:

yi value of the effect size or outcome measure.
vi corresponding (estimated) sampling variance.

Author(s)

Wolfgang Viechtbauer; wvb@www.wvbauer.com; http://www.wvbauer.com/

References

Cooper, H. C. & Hedges, L. V. (1994) The handbook of research synthesis. New York: Russell Sage Foundation.

Fisher, R. A. (1921) On the “probable error” of a coefficient of correlation deduced from a small sample. Metron, 1, 1–32.

Freeman, M. F. & Tukey, J. W. (1950) Transformations related to the angular and the square root. Annals of Mathematical Statistics, 21, 607–611.

Hedges, L. V. (1989) An unbiased correction for sampling error in validity generalization studies. Journal of Applied Psychology, 74, 469–477.

Hedges, L. V. & Olkin, I. (1985) Statistical methods for meta-analysis. San Diego, CA: Academic Press.

Ruecker, G., Schwarzer, G., Carpenter, J. & Olkin, I. (2009) Why add anything to nothing? The arcsine difference as a measure of treatment effect in meta-analysis with zero cells. Statistics in Medicine, 28, 721–738.

Olkin, I. & Pratt, J. W. (1958) Unbiased estimation of certain correlation coefficients. Annals of Mathematical Statistics, 29, 201–211.

Yusuf, S., Peto, R., Lewis, J., Collins, R. & Sleight, P. (1985) Beta blockade during and after myocardial infarction: An overview of the randomized trials. Progress in Cardiovascular Disease, 27, 335–371.

See Also

rma.uni, rma.mh, rma.peto

Examples

### load BCG vaccine data
data(dat.bcg)

### calculate log risk ratios and corresponding sampling variances
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)

### add log risk ratios and sampling variances to the data frame
dat <- cbind(dat.bcg, dat)
dat

[Package metafor version 0.5-5 Index]