Skip to content
Prev 54 / 5632 Next

[R-meta] Ratio of Means

Also, I cannot reproduce this problem.

library(metafor)

arm.df <- read.table(header=TRUE, text = "
id            study group  mean    sd   n
1        Arici 2009   Exp 35.73  5.24  27
2        Arici 2009   Ctl 62.93  8.67  27
3       Arslan 2011   Exp  4.25  2.03  20")

escalc(measure='MNLN', mi=mean, sdi=sd, ni=n) ### this obviously fails since the variables cannot be found

escalc(measure='MNLN', mi=mean, sdi=sd, ni=n, data=arm.df) ### works

attach(arm.df)
escalc(measure='MNLN', mi=mean, sdi=sd, ni=n) ### also works, but don't use attach (shudder)
detach(arm.df)

Best,
Wolfgang

-----Original Message-----
From: Michael Dewey [mailto:lists at dewey.myzen.co.uk] 
Sent: Friday, July 21, 2017 13:01
To: Nathan Pace; Viechtbauer Wolfgang (SP); r-sig-meta-analysis at r-project.org
Subject: Re: [R-meta] Ratio of Means

Dear Nathan

Try using the data parameter rather than attaching arm.df.
Alternatively call the standard deviation something other than sd.
On 20/07/2017 22:17, Nathan Pace wrote: