# Effect Size Computation for Meta Analysis

Implementation of the web-based 'Practical Meta-Analysis Effect Size Calculator' from David B. Wilson (< http://www.campbellcollaboration.org/escalc/html/EffectSizeCalculator-Home.php>) in R. Based on the input, the effect size can be returned as standardized mean difference, Cohen's f, Hedges' g, Pearson's r or Fisher's transformation z, odds ratio or log odds, or eta squared effect size.

This is an R implementation of the web-based 'Practical Meta-Analysis Effect Size Calculator' from David B. Wilson. The original calculator can be found at http://www.campbellcollaboration.org/escalc/html/EffectSizeCalculator-Home.php.

Based on the input, the effect size can be returned as standardized mean difference (`d`), Cohen's `f`, `eta` squared, Hedges' `g`, correlation coefficient effect size `r` or Fisher's transformation `z`, odds ratio or log odds effect size.

### Return values

The return value of all functions has the same structure:

• The effect size, whether being `d`, `g`, `r`, `f`, (Cox) odds ratios or (Cox) logits, is always named `es`.
• The standard error of the effect size, `se`.
• The variance of the effect size, `var`.
• The lower and upper confidence limits `ci.lo` and `ci.hi`.
• The weight factor, based on the inverse-variance, `w`.
• The total sample size `totaln`.
• The effect size measure, `measure`, which is typically specified via the `es.type`-argument.
• Information on the effect-size conversion, `info`.
• A string with the study name, if the `study`-argument was specified in function calls.

#### Correlation Effect Size

If the correlation effect size `r` is computed, the transformed Fisher's z and their confidence intervals are also returned. The variance and standard error for the correlation effect size r are always based on Fisher's transformation.

#### Odds Ratio Effect Size

For odds ratios, the variance and standard error are always returned on the log-scale!

### S3 methods

The `esc` package offers the S3 methods `print` and `as.data.frame`

### Combining results into a single data frame

The `combine_esc` method is a convenient way to create pooled data frames of different effect size calculations, for further use. Here is an example of `combine_esc`, which returns a `data.frame` object.

``````e1 <- esc_2x2(grp1yes = 30, grp1no = 50, grp2yes = 40, grp2no = 45, study = "Study 1")
e2 <- esc_2x2(grp1yes = 30, grp1no = 50, grp2yes = 40, grp2no = 45, es.type = "or", study = "Study 2")
e3 <- esc_t(p = 0.03, grp1n = 100, grp2n = 150, study = "Study 3")
e4 <- esc_mean_sd(grp1m = 7, grp1sd = 2, grp1n = 50, grp2m = 9,
grp2sd = 3, grp2n = 60, es.type = "logit", study = "Study 4")

combine_esc(e1, e2, e3, e4)
> 1 Study 1 -0.3930426  9.944751         165 0.3171050 0.10055556 -1.01455689  0.2284717   logit
> 2 Study 2  0.6750000  9.944751         165 0.3171050 0.10055556  0.36256305  1.2566780      or
> 3 Study 3  0.2817789 59.433720         250 0.1297130 0.01682547  0.02754605  0.5360117       d
> 4 Study 4 -1.3981827  7.721145         110 0.3598812 0.12951447 -2.10353685 -0.6928285   logit
``````

esc is still under development, i.e. not all effect size computation options are implemented yet. The remaining options will follow in further updates.

## Installation

### Latest development build

To install the latest development snapshot (see latest changes below), type following commands into the R console:

### Officiale, stable release

To install the latest stable release from CRAN, type following command into the R console:

## Citation

In case you want / have to cite my package, please use `citation('esc')` for citation information.

# esc 0.4.1

## Bug fixes

• Fix issue with wrong computation of confidence intervals when converting effect sizes from d to f (`esc_d2f()`).

# esc 0.4.0

## General

• Functions now also return effect sizes Cohen's f or eta squared.

## New functions

• More functions to convert effect size into other effect size measures (`cohens_f()`, `odds_ratio()`, `log_odds()`, `pearsons_r()`, `eta_squared()` and `cohens_d()`).

## Bug fixes

• In rare cases, `esc_mean_sd()` tried to calculate the square root of negative values when computing the pooled standard deviance. In such cases, an alternative formular for the pooled SD is used.

# esc 0.3.2

## Bug fixes

• `combine_esc()` did not work for effect sizes computed with `esc_t()`, when the returned effect size was `r`.

# esc 0.3.1

## Bug fixes

• `effect_sizes()` did not always properly extract study names and used numeric indices instead character values.

# esc 0.3.0

## New functions

• `effect_sizes()` to generate a data frame with results of multiple effect size computations, based on data from another data frame.

## Bug fixes

• Fix control statements with condition with greater than one, which currently give a warning, but in future R versions may throw an error.

# esc 0.2.0

## New functions

• `write_esc()` as a convenient wrapper to write results to an Excel csv-file.

# Reference manual

install.packages("esc")

0.5.1 by Daniel Lüdecke, a year ago

https://strengejacke.github.io/esc

Report a bug at https://github.com/strengejacke/esc/issues

Browse source code at https://github.com/cran/esc

Authors: Daniel Lüdecke [aut, cre]

Documentation:   PDF Manual