2
$\begingroup$

I was conducting a meta-analysis of single proportions(i.e. without a control group) and was trying to perform a meta-regression on a moderator in my data set (lable:modb) using two different R packages (meta and metafor) in order to see if they could give me the same results. I used three transformation methods before performing meta-regression:1)no transformation,2)logit transformation, and 3)freeman-tukey double arcsine transformation. Interestingly, when I applied the logit transformation, the two packages gave me exactly the same results (I also tested the data in the Comprehensive Meta-Analysis and I got exactly the same results as I did with the logit transformation). But, when I didn't transform my data or used the double arcsine transformation, the packages gave me slightly different results. I wonder why this happened. Below is my code: The meta package code:

dat=read.table("D:\\...\\Example.csv",header=T,sep=",")
pes=metaprop(cases,total,author,data=dat,sm="PRAW",method.tau="REML",method.ci="CP",incr=0.5,allincr=FALSE,addincr=FALSE,title="") #pes=pooled effect size
mar.modb=metareg(pes,modb,method.tau = pes$method.tau) #mar.modb=meta-regression.moderator b;change "PRAW" to "PFT" if you want to use the double arcsine transformation
mar.modb

The results:

Mixed-Effects Model (k = 10; tau^2 estimator: REML)

tau^2 (estimated amount of residual heterogeneity):     0.0019 (SE = 0.0014)
tau (square root of estimated tau^2 value):             0.0434
I^2 (residual heterogeneity / unaccounted variability): 89.14%
H^2 (unaccounted variability / sampling variability):   9.20
R^2 (amount of heterogeneity accounted for):            0.00%

Test for Residual Heterogeneity: 
QE(df = 8) = 72.2927, p-val < .0001

Test of Moderators (coefficient(s) 2): 
QM(df = 1) = 0.6958, p-val = 0.4042

Model Results:

           estimate      se     zval    pval    ci.lb   ci.ub     
intrcpt    0.9868  0.0535  18.4597  <.0001   0.8820  1.0915  ***
modb      -0.0020  0.0024  -0.8341  0.4042  -0.0067  0.0027     

---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

The metafor package code:

dat=read.csv("D:\\...\\Example.csv",header=T,sep=",")
ies=escalc(measure="PR",xi=cases,ni=total,data=dat)#ies=individual effect size;change "PR" to "PFT" if you want to use the double arcsine transformation
mar.modb=rma(yi,vi,data=ies,mods = ~ modb,method="REML",test="z")
mar.modb

The results:

Mixed-Effects Model (k = 10; tau^2 estimator: REML)

tau^2 (estimated amount of residual heterogeneity):     0.0016 (SE = 0.0012)
tau (square root of estimated tau^2 value):             0.0400
I^2 (residual heterogeneity / unaccounted variability): 87.45%
H^2 (unaccounted variability / sampling variability):   7.97
R^2 (amount of heterogeneity accounted for):            0.00%

Test for Residual Heterogeneity: 
QE(df = 8) = 62.1739, p-val < .0001

Test of Moderators (coefficient(s) 2): 
QM(df = 1) = 0.5879, p-val = 0.4432

Model Results:

           estimate      se     zval    pval    ci.lb   ci.ub     
intrcpt    0.9805  0.0502  19.5228  <.0001   0.8820  1.0789  ***
modb      -0.0017  0.0022  -0.7667  0.4432  -0.0061  0.0027     

---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

My data is here.

$\endgroup$

1 Answer 1

3
$\begingroup$

This small discrepancy is due to different handling of proportions equal to 0 or 1 (there are a couple of 1s in this dataset). The meta package does not adjust the counts for computing the proportions themselves, but it does the usual +1/2 adjustment for computing the sampling variances. The metafor package applies the +1/2 adjustment for computing the proportions and the sampling variances. With the following code, you can get metafor to do the same as the meta package:

ies <- escalc(measure="PR", xi=cases, ni=total, data=dat, add=0)
ies$vi <- escalc(measure="PR", xi=cases, ni=total, data=dat)$vi
mar.modb <- rma(yi, vi, data=ies, mods = ~ modb, method="REML", test="z")
mar.modb
$\endgroup$
2
  • $\begingroup$ Hi sir, the code above works when I don't transform my data. What code should I use to get metafor to do the same as the meta package when I perform the double arcsine transformation? $\endgroup$
    – Naike Wang
    Commented Jun 10, 2017 at 1:52
  • $\begingroup$ Just skip the ies$vi <- ... line. $\endgroup$
    – Wolfgang
    Commented Jun 10, 2017 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.