Message-ID: <c8ad3ec2f76540b5a6e794e0c7190e2d@maastrichtuniversity.nl>
Date: 2023-07-12T14:34:58Z
From: Wolfgang Viechtbauer
Subject: [R-meta] Calculating standard errors from confidence interval and weights assigned
In-Reply-To: <4599a36a-8322-3f34-6271-5ea15e345e4c@dewey.myzen.co.uk>
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
>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org] On
>Behalf Of Michael Dewey via R-sig-meta-analysis
>Sent: Wednesday, 12 July, 2023 16:09
>To: R Special Interest Group for Meta-Analysis
>Cc: Michael Dewey
>Subject: Re: [R-meta] Calculating standard errors from confidence interval and
>weights assigned
>
>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:
>> 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.
>>
>> Untitled.png
>> Thank you,
>> Win