Skip to content

[R-meta] Calculating standard errors from confidence interval and weights assigned

4 messages · Michael Dewey, Wolfgang Viechtbauer, Win Thu

#
Hello,

I would like to seek your opinions on calculating standard error (sei) from
confidence intervals, and weights assigned to each study in a random
effects model.
To include in rma function* rma(yi, sei, data)*, I used the following
formula to calculate sei

*sei <- [log(CI upper limit) - log(CI lower limit)] / 3.92 *
For yi, it will be log(relative risk).

Then, I have the following weights for each study, which I am not very
confident as the studies with larger sample sizes (cohort studies) were
given reduced weights compared to smaller studies (case-control).
I need to combine both studies as there are limited studies on the topic.

I am grateful for your feedback.

[image: Untitled.png]
Thank you,
Win

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20230712/de959cc5/attachment.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Untitled.png
Type: image/png
Size: 8207 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20230712/de959cc5/attachment.png>
#
Dear Win

If you fit a random-effects model then the weights become more nearly 
equal tending to equality as tau^2 increases. I suspect that may be the 
issue here.

Michael
On 12/07/2023 05:36, Win Thu via R-sig-meta-analysis wrote:

  
    
  
#
This aside, the syntax rma(yi, sei, data) is wrong, since the second argument to rma() is 'vi', which is for the *sampling variances* (i.e., the squared standard errors). So, either do rma(yi, sei^2, data) or use the appropriate argument for passing the standard errors, that is, rma(yi, sei=sei, data).

In recent versions of metafor, rma() actually tries to check for this (based on the variable name specified for the 'vi' argument), so syntax like rma(yi, sei) should yield a warning about this.

Best,
Wolfgang
#
Dear Michal - thank you for the feedback.
Dear Wolgang - thank you for the correction about syntax. I used the
correct one rma(yi, sei=sei, data) in the analysis and was unsure about the
weights assigned to each study.

Thank you,
Win








On Thu, Jul 13, 2023 at 2:35?AM Viechtbauer, Wolfgang (NP) via
R-sig-meta-analysis <r-sig-meta-analysis at r-project.org> wrote: