[R-meta] R: escalc() function and weights

Prof. Mario Petretta petrett@ @end|ng |rom un|n@@|t
Fri Jun 26 18:48:23 CEST 2020


Dear Wolfgang,

Thanks again for your time !

Mario 

-----Messaggio originale-----
Da: Viechtbauer, Wolfgang (SP)
[mailto:wolfgang.viechtbauer using maastrichtuniversity.nl] 
Inviato: venerdì 26 giugno 2020 17:33
A: Prof. Mario Petretta <petretta using unina.it>;
r-sig-meta-analysis using r-project.org
Oggetto: RE: [R-meta] escalc() function and weights

Dear Mario,

I removed the 'formula interface' to escalc() because it did not add
anything beyond what you can do with the escalc() function without that way
of specifying the data. Keeping it in the package meant that I had to
maintain two different but equivalent ways of specifying the data for
escalc() and hence extra work for me.

So, the example where the data are specified in the 'long' format from the
JSS package won't work anymore. However, one can easily restructure such a
long format dataset back to a wide one with the reshape() function. So,
given the dataset as shown on page 11 in the article, one could do:

dat.fm$cell <- 1:4
dat.wide <- reshape(dat.fm, direction="wide", idvar="study",
timevar="cell")[c(1,4,7,10,13)]

and then use escalc():

escalc(measure="RR", ai=freq.1, bi=freq.2, ci=freq.3, di=freq.4,
data=dat.wide)

Best,
Wolfgang

>-----Original Message-----
>From: R-sig-meta-analysis 
>[mailto:r-sig-meta-analysis-bounces using r-project.org]
>On Behalf Of Prof. Mario Petretta
>Sent: Friday, 26 June, 2020 17:17
>To: r-sig-meta-analysis using r-project.org
>Subject: [R-meta] escalc() function and weights
>
>Dear All,
>
>in a previous post (see below) it was pointed out by Wolfgang 
>Viechtbauer that the use of weight in the escalc () function is deprecated.
>
>Please, it is possible to clarify:
>
>1) Why is the use of weight in the escalc () function is now deprecated?
>
>2) What is the correct code to use for the example of the tutorial on 
>the "Metafor" package and the "escalc" function using the "long" bcg 
>data obtained with the reshape2 function, as shown in the previous post ?
>
>Thank you for your time
>
>Mario Petretta
>
>Mario Petretta
>Professor of Internal Medicine
>Department of Translational Medical Science University of Naples 
>Federico II Naples - Italy
>
>Tue, 16 Jun 2020 09:51:21 -0700
>
>Dear Amoatwi,
>
>This way of using the escalc() function has been deprecated. It might 
>be added back once there is actually any benefit from having this 
>functionality, but for years it just meant that I had to maintain two 
>different ways of doing the exact same thing without any additional 
>benefits.
>
>Best,
>Wolfgang



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