[R-meta] Ratio of Means

Viechtbauer Wolfgang (SP) wolfgang.viechtbauer at maastrichtuniversity.nl
Tue Jul 25 15:02:32 CEST 2017


Ah, right. It's on my to-do list.

But you can just create the plot manually. Using the same example:

dat <- escalc(measure="PLO", xi=cpos, mi=cneg, data=dat, var.names=c("yi1","vi1"))
dat <- escalc(measure="PLO", xi=tpos, mi=tneg, data=dat, var.names=c("yi2","vi2"))

wi <- with(dat, sqrt(1/(vi1 + vi2)))
psize <- 0.5 + 3 * (wi - min(wi))/(max(wi)-min(wi))
with(dat, plot(yi1, yi2, cex=psize, xlim=c(-8,0), ylim=c(-8,0), pch=21, bg="gray"))
grid()
abline(a=0, b=1, lty="dotted")

points(coef(res)[1], coef(res)[2], pch=19, cex=3)
abline(a=b0, b=b1, lwd=3)

library(ellipse)
xy <- ellipse(res$G, centre=coef(res), level=.95)
lines(xy[,1],xy[,2], col="gray50")

Adjust for measure="MNLN". Or use ggplot2.

Best,
Wolfgang

-----Original Message-----
From: Nathan Pace [mailto:n.l.pace at utah.edu] 
Sent: Tuesday, July 25, 2017 14:32
To: Viechtbauer Wolfgang (SP); r-sig-meta-analysis at r-project.org
Subject: Re: [R-meta] Ratio of Means

Thanks for this latest update.

The labbe function does not accept models with the MNLN measure.

I will use ggplot2 to create a scatterplot then add point + line + ellipse.

Any workarounds for using labbe with MNLN?

Best,

Nathan

On 2507//2017, 5:06 AM, "Viechtbauer Wolfgang (SP)" <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote:

    I've updated:
    
    http://www.metafor-project.org/doku.php/analyses:vanhouwelingen2002
    
    It now shows how to get the regression of the underlying effects and also how to draw the confidence ellipse.
    
    The 5.99 comes from qchisq(.95, df=2).
    
    Note that the ellipse in the paper (Figure 5) seems to be drawn incorrectly.
    
    Best,
    Wolfgang
    
    -- 
    Wolfgang Viechtbauer, Ph.D., Statistician | Department of Psychiatry and    
    Neuropsychology | Maastricht University | P.O. Box 616 (VIJV1) | 6200 MD    
    Maastricht, The Netherlands | +31 (43) 388-4170 | http://www.wvbauer.com    
    
    -----Original Message-----
    From: Nathan Pace [mailto:n.l.pace at utah.edu] 
    Sent: Tuesday, July 25, 2017 07:42
    To: Viechtbauer Wolfgang (SP); Michael Dewey; r-sig-meta-analysis at r-project.org
    Subject: Re: [R-meta] Ratio of Means
    
    Thanks to Gerta, Wolfgang, Michael, and James for comments and pointers to functions and codes.
    
    In my data set the slope is one (0.97 +/- 0.04).
    
    The QE for residual heterogeneity is very large (~30000).
    
    In van Houwelingen (page 605, Figure 5) a coverage ellipse is plotted for vaccination data.
    
    An equation is shown in the figure legend.
    
    I don’t understand the source of the constant (5.99) on the rhs.
    
    Comments?
    
    Nathan


More information about the R-sig-meta-analysis mailing list