# [R-meta] Metafor Fixed Effects giving I2- why?

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Tue Jul 30 15:28:20 CEST 2019

My understanding of Arthur's question was that he is wondering why the following code yields a value of I^2 = 40% given that this fits a fixed-effects model where tau^2 = 0 by definition.

library(metafor)

yi <- c(.2, .3, .4, .5)
vi <- rep(.01, 4)

res <- rma(yi, vi, method="FE")
res\$I2

(and in the 'devel' version, the value of I^2 is shown explicitly in the output also for a FE model).

Best,
Wolfgang

-----Original Message-----
From: Gerta Ruecker [mailto:ruecker using imbi.uni-freiburg.de]
Sent: Tuesday, 30 July, 2019 10:37
To: Viechtbauer, Wolfgang (SP); Aman Dheri; r-sig-meta-analysis using r-project.org
Subject: Re: [R-meta] Metafor Fixed Effects giving I2- why?

Hi all,

The question whether it is possible in the fixed effect model that tau^2
= 0 though I^2 > 0 was not answered in Wolfgang's reply. Following his
response, in this case metafor calculates

I^2 = (Q - (df)) / Q,

which probably means

I^2 = max(0, (Q - (df)) / Q).

Now it depends on the way tau^2 is calculated. For the DerSimonian-Laird
estimate, \hat tau^2 has the same numerator as I^2, that is, if \hat
tau^2 = 0, then I^2 = 0.

Thus the case Arthur describes can only, if at all, occur for other
tau^2 estimates. Thus, I repeat his question: Is it possible and under
which circumstances?

Best,

Gerta

Am 29.07.2019 um 19:56 schrieb Viechtbauer, Wolfgang (SP):
> Hi Arthur,
>
> Indeed, for random/mixed-effects models, I^2 is computed with tau^2 / (tau^2 + v), where tau^2 is the estimate of (residual) heterogeneity and v is the 'typical' sampling variance. So, if tau^2 = 0, then I^2 = 0.
>
> Since I^2 is a useful statistic also for fixed-effects models, I^2 is also computed then, but using (Q - (df)) / Q, where Q is the test statistic for (residual) heterogeneity and df = degrees of freedom of the test (k-1 for a model without moderators). But this has no effect on the rest of the computations (such as the weights).
>
> Best,
> Wolfgang
>
> -----Original Message-----
> From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On Behalf Of Aman Dheri
> Sent: Monday, 29 July, 2019 19:11
> To: r-sig-meta-analysis using r-project.org
> Subject: [R-meta] Metafor Fixed Effects giving I2- why?
>
> Hello,
>
> I am doing a fixed effects meta-analysis in Metafor and I see that it returns a non-zero I^2 value when tau^2 is always zero. According to Metafor documentation the fixed effects model in rma.uni should be 0 because of its calculation from the tau^2. Does any one know why this is happening, and if it is changing the weighting during the meta-analysis vs if the I^2 was 0?
>
> I assumed my code wasn’t needed for the answer to this but please let me know if I’m wrong!
>
> Thank you!
> Arthur