[R-meta] How does the rma.mv function handle multiple inferences within a study-level

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Tue Apr 14 17:36:49 CEST 2020

To see what is going on, take a look at the actual weight matrix:

case <- data.frame(Study=c("a","b","c","c"), ES=c(-1.5,-3,1.5,3), SE=c(.2,.4,.2,.4))
res <- rma.mv(ES, SE^2, random = ~ 1 | Study, data=case)
weights(res, type="matrix")

The model estimate is computed with:

b = (X'WX)^(-1) X'Wy

Leaving aside the (X'WX)^(-1) part (which is just a scalar here), X'Wy is then:

          [w11          ] [y1]             [w11*y1         ]
[1 1 1 1] [   w22       ] [y2] = [1 1 1 1] [w22*y2         ]
          [      w33 w34] [y3]             [w33*y3 + w34*y4]
          [      w34 w44] [y4]             [w34*y3 + w44*y4]

= w11*y1 + w22*y2 + w33*y3 + w34*y4 + w34*y3 + w44*y4
= w11*y1 + w22*y2 + (w33+w34)*y3 + (w34+w44)*y4

As you can see above, w34 is negative and almost as large as w33 and w44 (which is indeed a result of sigma^2 being so large here). So, the weights attached to y1-y4 are:

w11     = 0.166950
w22     = 0.163671
w33+w34 = 0.133739
w34+w44 = 0.033435

So, the two estimates coming from study 'c' end up receiving together about as much weight (0.133739 + 0.033435 = 0.167174) as the two individual estimates from studies 'a' and 'b'.

In case 2, things are indeed simple and the weights are simply 1/(SE^2 + sigma^2) for each estimate.


>-----Original Message-----
>From: Divya Ravichandar [mailto:divya using secondgenome.com]
>Sent: Wednesday, 01 April, 2020 23:06
>To: Viechtbauer, Wolfgang (SP)
>Cc: r-sig-meta-analysis using r-project.org
>Subject: Re: [R-meta] How does the rma.mv function handle multiple
>inferences within a study-level
>I apologize for my haste in the previous email. All sigma^2 in the above
>matrix are indeed the same (There were some rounding offs I overlooked).
>So would a take away here be that since there are two inferences under one
>Study, these are additionally weighted by the sigma^2? As opposed to case2
>shown below where with 1 inference per Bin-level, a meta-analysis at the Bin
>level would simply down weight each inference by Sigma^2+SE^2 only
>Case 2
>case <- data.frame(Study=c("a","b","c","c"), Bin=c("a","b","c","d"),ES=c(-
>1.5,-3,1.5,3), SE=c(.2,.4,.2,.4))
>res <- rma.mv(ES, SE^2, random = ~ 1 | Bin, data=case)
>On Wed, Apr 1, 2020 at 2:00 PM Divya Ravichandar <divya using secondgenome.com>
>Thank you for your explanation of how the weight matrix is computed.
>A followup question, on the 'sigma^2' only terms in the variance matrix
>[terms in matrix positions (3,4) & (4.3)].
>I assume (based on running the example above) the sigma^2 here is different
>from the sigma^2 used along the diagonal. Is this correct? If yes, is a
>sigma^2 estimated based on just the values corresponding to study c in the
>Thank you
>On Wed, Apr 1, 2020 at 1:21 PM Viechtbauer, Wolfgang (SP)
><wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
>Dear Divya,
>The model you are using implies the following structure for the marginal
>var-cov matrix of the estimates:
>[SE_1^2 + sigma^2                                                   ]
>[                 SE_2^2 + sigma^2                                  ]
>[                                  SE_3^2 + sigma^2 sigma^2         ]
>[                                  sigma^2          SE_4^2 + sigma^2]
>The weight matrix is the inverse thereof. See:
>case <- data.frame(Study=c("a","b","c","c"), ES=c(-1.5,-3,1.5,3),
>res <- rma.mv(ES, SE^2, random = ~ 1 | Study, data=case)
>vcov(res, type="obs")
>weights(res, type="matrix")
>The model estimate is then given by b = (X'WX)^(-1) X'Wy, where X is just a
>column vector of 1s, W is the weight matrix above, and y is a column vector
>with the 4 effect sizes.
>-----Original Message-----
>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org]
>On Behalf Of Divya Ravichandar
>Sent: Wednesday, 01 April, 2020 21:59
>To: r-sig-meta-analysis using r-project.org
>Subject: [R-meta] How does the rma.mv function handle multiple inferences
>within a study-level
>My use case is presented in the dataframe below. Studies a,b and c are to
>be integrated in a meta-analysis using: rma.mv(ES, SE^2, random = ~ 1 |
>Study, data=case)
>In this case, studies a & b have one inference each but because of my study
>design two inferences exist for study c.  I am curious as to how the 2
>inferences under study c are weighted in the meta-analysis calculation as
>compared to the inference for studies a &b.
>case <- data.frame(Study=
>*Divya Ravichandar*
>Second Genome

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