[R-meta] Sample sized weighted studies for metamean function
Viechtbauer, Wolfgang (NP)
wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Thu Oct 17 12:38:11 CEST 2024
Hi all,
I haven't checked what specific methods are implemented in metamean() for converting five-number summary statistics to means/SDs, but there is a function for this as well in metafor:
https://wviechtb.github.io/metafor/reference/conv.fivenum.html
And Guido's 'P.S.' is very important, as it sounds like you may be feeding incorrect input to the rma() function.
Best,
Wolfgang
> -----Original Message-----
> From: R-sig-meta-analysis <r-sig-meta-analysis-bounces using r-project.org> On Behalf
> Of Dr. Guido Schwarzer via R-sig-meta-analysis
> Sent: Thursday, October 17, 2024 12:26
> To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis using r-
> project.org>
> Cc: Dr. Guido Schwarzer <guido.schwarzer using uniklinik-freiburg.de>
> Subject: Re: [R-meta] Sample sized weighted studies for metamean function
>
> Massimo,
>
> R package meta does not have an argument like 'weights' to provide user-defined
> weights.
>
> You could use metamean() from R package meta to approximate the standard error
> from quantiles and use the calculated values as input to rma() from R package
> metafor. List elements 'TE', 'seTE', and 'n' from a metamean object contain the
> necessary input to rma().
>
> Best,
> Guido
>
> P.S. I notice in your rma command the assignment 'vi = MVR_data$time_SD' which
> is probably wrong. Argument 'vi' expects a variance (you could use argument
> 'sei' to provide a standard error). Furthermore, time_SD doesn't sound like a
> standard error which you could provide in argument 'sei'. It is possible to
> provide the information for studies with single means using arguments 'mi',
> 'sdi' and 'ni'; see the help page of escalc().
>
> -----Ursprüngliche Nachricht-----
> Von: R-sig-meta-analysis <r-sig-meta-analysis-bounces using r-project.org <mailto:r-
> sig-meta-analysis-bounces using r-project.org>> im Auftrag von R-meta <r-sig-meta-
> analysis using r-project.org <mailto:r-sig-meta-analysis using r-project.org>>
> Antworten an: R-meta <r-sig-meta-analysis using r-project.org <mailto:r-sig-meta-
> analysis using r-project.org>>
> Datum: Mittwoch, 16. Oktober 2024 um 19:22
> An: R-meta <r-sig-meta-analysis using r-project.org <mailto:r-sig-meta-analysis using r-
> project.org>>
> Cc: Massimo Baudo <massimo.baudo using icloud.com <mailto:massimo.baudo using icloud.com>>
> Betreff: [R-meta] Sample sized weighted studies for metamean function
>
> Dear Community,
>
> I have the following question regarding the metamean function in meta, and
> couldn’t find any previous threads on this regard.
>
> I would like to calculate the pooled estimated mean of a follow-up time
> parameter: time from the first surgery to the second surgery. Studies report
> either mean (SD), or median (q1-q3). From my understanding (let me know if I am
> wrong), only the inverse of the variance is used to estimate the studies in
> metamean. This would be incorrect from my point of view to be used in this
> specific case, as the assumption is that larger studies have lower variance,
> thus weighted higher. However, for “follow-up” parameters larger studies could
> still have a large variance as some patients may have the whole follow-up
> length, while others would have a very short one. In this case, these larger
> studies would be weighted less (as if they were smaller studies), while smaller
> studies, which may have a smaller variance, would be weighted very high.
> Therefore, I would prefer to weight this parameter by the sample size. I could
> do it with metafor as follows:
>
> MVR_data$weights = MVR_data$Samplesize / sum(MVR_data$Samplesize)
> meta_analysis <- rma(yi = MVR_data$time_mean, vi = MVR_data$time_SD, weights =
> MVR_data$weights, data = MVR_data, method = “DL")
> summary(meta_analysis)
>
> This way though, I “loose” the very useful function of mean/SD approximation of
> the metamean function when dealing with median/q1/q3 or min/max.
> Is there a possible solution to my problem with metamean?
>
> Thank you for your support,
>
> Massimo
More information about the R-sig-meta-analysis
mailing list