A set of transformation functions useful for meta-analyses.

transf.rtoz(xi, ...)
transf.ztor(xi, ...)
transf.logit(xi, ...)
transf.ilogit(xi, ...)
transf.arcsin(xi, ...)
transf.iarcsin(xi, ...)
transf.pft(xi, ni, ...)
transf.ipft(xi, ni, ...)
transf.ipft.hm(xi, targs, ...)
transf.isqrt(xi, ...)
transf.irft(xi, ti, ...)
transf.iirft(xi, ti, ...)
transf.ahw(xi, ...)
transf.iahw(xi, ...)
transf.abt(xi, ...)
transf.iabt(xi, ...)
transf.ztor.int(xi, targs, ...)
transf.exp.int(xi, targs, ...)
transf.ilogit.int(xi, targs, ...)
transf.dtou1(xi, ...)
transf.dtou2(xi, ...)
transf.dtou3(xi, ...)
transf.dtorpb(xi, n1i, n2i, ...)
transf.dtobesd(xi, ...)
transf.dtomd(xi, targs, ...)
transf.logortord(xi, pc, ...)
transf.logortorr(xi, pc, ...)

Arguments

xi

vector of values to be transformed.

ni

vector of sample sizes.

n1i

vector of sample sizes for the first group.

n2i

vector of sample sizes for the second group.

ti

vector of person-times at risk.

pc

control group risk (either a single value or a vector).

targs

list with additional arguments for the transformation function. See ‘Details’.

...

other arguments.

Details

The following transformation functions are currently implemented:

  • transf.rtoz: Fisher's r-to-z transformation for correlation coefficients (same as atanh(x)).

  • transf.ztor: inverse of Fisher's r-to-z transformation (i.e., the z-to-r transformation; same as tanh(x)).

  • transf.logit: logit (log odds) transformation for proportions (same as qlogis(x)).

  • transf.ilogit: inverse of the logit transformation (same as plogis(x)).

  • transf.arcsin: arcsine square root transformation for proportions.

  • transf.iarcsin: inverse of the arcsine transformation.

  • transf.pft: Freeman-Tukey (double arcsine) transformation for proportions. See Freeman & Tukey (1950). The xi argument is used to specify the proportions and the ni argument the corresponding sample sizes.

  • transf.ipft: inverse of the Freeman-Tukey (double arcsine) transformation for proportions. See Miller (1978).

  • transf.ipft.hm: inverse of the Freeman-Tukey (double arcsine) transformation for proportions using the harmonic mean of the sample sizes for the back-transformation. See Miller (1978). The sample sizes are specified via the targs argument (the list element should be called ni).

  • transf.isqrt: inverse of the square root transformation (i.e., function to square a number).

  • transf.irft: Freeman-Tukey transformation for incidence rates. See Freeman & Tukey (1950). The xi argument is used to specify the incidence rates and the ti argument the corresponding person-times at risk.

  • transf.iirft: inverse of the Freeman-Tukey transformation for incidence rates.

  • transf.ahw: transformation of coefficient alpha as suggested by Hakstian & Whalen (1976), except that \(1-(1-\alpha)^{1/3}\) is used (so that the transformed values are a monotonically increasing function of the \(\alpha\) values).

  • transf.iahw: inverse of the transformation of coefficient alpha as suggested by Hakstian & Whalen (1976).

  • transf.abt: transformation of coefficient alpha as suggested by Bonett (2002), except that \(-\ln(1-\alpha)\) is used (so that the transformed values are a monotonically increasing function of the \(\alpha\) values).

  • transf.iabt: inverse of the transformation of coefficient alpha as suggested by Bonett (2002).

  • transf.ztor.int: integral transformation method for the z-to-r transformation.

  • transf.exp.int: integral transformation method for the exponential transformation.

  • transf.ilogit.int: integral transformation method for the inverse of the logit transformation.

  • transf.dtou1: transformation of standardized mean differences to Cohen's \(U_1\) values (Cohen, 1988). Under the assumption that the data for those in the first (say, treated) and second (say, control) group are normally distributed with equal variances but potentially different means, Cohen's \(U_1\) indicates the proportion of non-overlap between the two distributions (i.e., when \(d=0\), then \(U_1\) is equal to 0, which goes to 1 as \(d\) increases).

  • transf.dtou2: transformation of standardized mean differences to Cohen's \(U_2\) values (Cohen, 1988). Under the same assumptions as above, Cohen's \(U_2\) indicates the proportion in the first group that exceeds the same proportion in the second group (i.e., when \(d=0\), then \(U_2\) is equal to 0.5, which goes to 1 as \(d\) increases).

  • transf.dtou3: transformation of standardized mean differences to Cohen's \(U_3\) values (Cohen, 1988). Under the same assumptions as above, Cohen's \(U_3\) indicates the proportion of individuals in the first group that have a higher value than the mean of those in the second group (i.e., when \(d=0\), then \(U_3\) is equal to 0.5, which goes to 1 as \(d\) increases).

  • transf.dtocles: transformation of standardized mean differences to common language effect size (CLES) values (McGraw & Wong, 1992) (also called the probability of superiority). A CLES value indicates the probability that a randomly sampled individual from the first group has a higher value than a randomly sampled individual from the second group (i.e., when \(d=0\), then the CLES is equal to 0.5, which goes to 1 as \(d\) increases).

  • transf.dtorpb: transformation of standardized mean differences to point-biserial correlations. If n1i and n2i are not specified, the function assumes n1i = n2i and uses the approximate formula \(r_{pb} = \frac{d}{\sqrt{d^2 + 4}}\). If n1i and n2i are specified, uses the exact transformation formula \(r_{pb} = \frac{d}{\sqrt{d^2 + h}}\), where \(h = \frac{m}{n_1} + \frac{m}{n_2}\) and \(m = n_1 + n_2 - 2\).

  • transf.dtobesd: transformation of standardized mean differences to binomial effect size display values (Rosenthal & Rubin, 1982). Note that the function only provides the proportion in the first group scoring above the median (the proportion in the second group scoring above the median is simply one minus the proportion in the first group scoring above the median).

  • transf.dtomd: transformation of standardized mean differences to mean differences given a known standard deviation, which must be specified via the targs argument.

  • transf.logortord: transformation of log odds ratios to risk differences, assuming a particular value for the control group risk (which needs to be specified via the pc argument).

  • transf.logortorr: transformation of log odds ratios to risk ratios, assuming a particular value for the control group risk (which needs to be specified via the pc argument).

Value

A vector with the transformed values.

Note

The integral transformation method for a transformation function \(h(z)\) is given by \[\int_{\textrm{lower}}^{\textrm{upper}} h(z) f(z) dz\] using the limits targs$lower and targs$upper, where \(f(z)\) is the density of a normal distribution with mean equal to xi and variance equal to targs$tau2. An example is provided below.

References

Bonett, D. G. (2002). Sample size requirements for testing and estimating coefficient alpha. Journal of Educational and Behavioral Statistics, 27(4), 335–340. https://doi.org/10.3102/10769986027004335

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Hillsdale, NJ: Lawrence Erlbaum Associates.

Fisher, R. A. (1921). On the “probable error” of a coefficient of correlation deduced from a small sample. Metron, 1, 1–32. http://hdl.handle.net/2440/15169

Freeman, M. F., & Tukey, J. W. (1950). Transformations related to the angular and the square root. Annals of Mathematical Statistics, 21(4), 607–611. https://doi.org/10.1214/aoms/1177729756

Hakstian, A. R., & Whalen, T. E. (1976). A k-sample significance test for independent alpha coefficients. Psychometrika, 41(2), 219–231. https://doi.org/10.1007/BF02291840

McGraw, K. O., & Wong, S. P. (1992). A common language effect size statistic. Psychological Bulletin, 111(2), 361–365. https://doi.org/10.1037/0033-2909.111.2.361

Miller, J. J. (1978). The inverse of the Freeman-Tukey double arcsine transformation. American Statistician, 32(4), 138. https://doi.org/10.1080/00031305.1978.10479283

Rosenthal, R., & Rubin, D. B. (1982). A simple, general purpose display of magnitude of experimental effect. Journal of Educational Psychology, 74(2), 166–169. https://doi.org/10.1037/0022-0663.74.2.166

Viechtbauer, W. (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1–48. https://doi.org/10.18637/jss.v036.i03

Examples

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

### fit random-effects model
res <- rma(yi, vi, data=dat)

### average risk ratio with 95% CI (but technically, this provides an
### estimate of the median risk ratio, not the mean risk ratio!)
predict(res, transf=exp)
#> 
#>    pred  ci.lb  ci.ub  pi.lb  pi.ub 
#>  0.4894 0.3441 0.6962 0.1546 1.5490 
#> 

### average risk ratio with 95% CI using the integral transformation
predict(res, transf=transf.exp.int, targs=list(tau2=res$tau2, lower=-4, upper=4))
#> 
#>    pred  ci.lb  ci.ub  pi.lb  pi.ub 
#>  0.5724 0.4024 0.8142 0.1809 1.8117 
#> 

### this also works
predict(res, transf=transf.exp.int, targs=list(tau2=res$tau2))
#> 
#>    pred  ci.lb  ci.ub  pi.lb  pi.ub 
#>  0.5724 0.4024 0.8142 0.1809 1.8117 
#> 

### this as well
predict(res, transf=transf.exp.int, targs=res$tau2)
#> 
#>    pred  ci.lb  ci.ub  pi.lb  pi.ub 
#>  0.5724 0.4024 0.8142 0.1809 1.8117 
#>