Skip to content
Back to formatted view

Raw Message

Message-ID: <b3d8c5655ea64bcf8c7deec5a3bd432a@UM-MAIL3214.unimaas.nl>
Date: 2020-08-10T13:06:46Z
From: Wolfgang Viechtbauer
Subject: [R-meta]  Deeks’ funnel plot asymmetry test for publication bias
In-Reply-To: <trinity-32167754-52c3-4ff0-b11f-110f005e5d13-1597054010384@3c-app-gmx-bap33>

Dear Tobias,

You can do this test by just setting the sampling variances of the log odds ratios to

1/(4*n1) + 1/(4*n2)
 
(where n1 and n2 are the number of cases and non-cases).

Here is an example, reproducing Figure 1 from Deeks et al. (2005) and the corresponding results from the regression test. Note that the points for studies 8 and 11 are not quite in the same place as what Figure 1 in the paper shows, so either I made a mistake in extracting the data from the Kearon et al. (1998) meta-analysis or they did. In any case, the code is correct - the results are just slightly different.

library(metafor)

dat <- read.table(header=TRUE, text = "
tp np  tn  nn
10 25  47  53
15 24  29  32
10 14  44  47
13 23 123 123
10 32  55  56
16 61 184 186
12 49 137 138
13 26  66  74
16 80  NA  NA
24 42  55  57
17 27  85  91
 5 22  45  46
18 31 240 245
24 28 104 104
26 55  81  89")

############################################################################

# remove 9th study, which has NAs for the specificity part anyway
dat <- dat[-9,]
rownames(dat) <- 1:nrow(dat)

# compute diagnostic log odds ratios and corresponding sampling variances
dat <- escalc(measure="OR", ai=tp, n1i=np, ci=nn-tn, n2i=nn, data=dat, add=1/2, to="all")
dat

# fit RE model
res <- rma(yi, vi, data=dat, method="DL")
res

############################################################################

# funnel plot with SE on the y-axis / corresponding regression test

sav <- funnel(res, atransf=exp, xlim=c(0,7), at=log(c(1, 10, 100, 1000)), 
              ylim=c(0,1.5), steps=4, back=NA, level=NA, lwd=2, lty=1)
text(sav$x+0.15, sav$y, cex=0.8)

reg <- regtest(res, model="lm")
reg

ys <- seq(0, 1.5, length=100)
lines(coef(reg$fit)[1] + coef(reg$fit)[2]*ys, ys, lwd=2, lty=3)

############################################################################

# funnel plot with total sample size on the y-axis / corresponding regression test

sav <- funnel(res, yaxis="ni", atransf=exp, xlim=c(0,7), at=log(c(1, 10, 100, 1000)), 
              ylim=c(0,300), steps=4, back=NA, level=NA, lwd=2, lty=1)
text(sav$x+0.15, sav$y, cex=0.8)

reg <- regtest(res, model="lm", predictor="ni")
reg

ys <- seq(0, 300, length=100)
lines(coef(reg$fit)[1] + coef(reg$fit)[2]*ys, ys, lwd=2, lty=3)

############################################################################

# funnel plot with 1/sqrt(ESS) on the y-axis / corresponding regression test

dat$vi <- 1/(4*dat$np) + 1/(4*dat$nn)
tmp <- rma(yi, vi, data=dat, method="DL")

sav <- funnel(tmp, atransf=exp, xlim=c(0,7), at=log(c(1, 10, 100, 1000)), 
              ylim=c(0,.15), steps=4, back=NA, level=NA, lwd=2, lty=1, refline=coef(res), ylab="1/root(ess)")
text(sav$x+0.15, sav$y, cex=0.8)

reg <- regtest(tmp, model="lm")
reg

ys <- seq(0, .15, length=100)
lines(coef(reg$fit)[1] + coef(reg$fit)[2]*ys, ys, lwd=2, lty=3)

############################################################################

Best,
Wolfgang

>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org]
>On Behalf Of Tobias Saueressig
>Sent: Monday, 10 August, 2020 12:07
>To: r-sig-meta-analysis at r-project.org
>Subject: [R-meta] Deeks? funnel plot asymmetry test for publication bias
>
>Hello,
>
>I am performing a diagnostic accuracy meta-analysis. As a check for
>publication bias/small study effects I want to use the Deeks' funnel plot
>asymmetry test for publication bias. I could not find a implementation in a
>software program. Does anybody know if there is a package that contains this
>test?
>
>Thank you in advance
>
>Tobias Saueressig