[R-meta] Multiple time point meta-analysis in metafor

Viechtbauer Wolfgang (SP) wolfgang.viechtbauer at maastrichtuniversity.nl
Sun Sep 24 00:01:18 CEST 2017


Yes, in essence, anything with the same level of the clustering variable is allowed/assumed to be potentially dependent, so that would also cover the case you are describing. In a way, using cluster robust inferences in this way is a sort of 'catch all' approach to accounting for possible dependency (of various sorts). I am not sure if that is the best approach, but it's certainly better than ignoring the dependency.

Best,
Wolfgang

-----Original Message-----
From: Daniel Quintana [mailto:daniel.quintana at medisin.uio.no] 
Sent: Friday, 22 September, 2017 12:02
To: r-sig-meta-analysis at r-project.org
Cc: Viechtbauer Wolfgang (SP)
Subject: Re: Multiple time point meta-analysis in metafor

Hi Wolfgang, 

Thank you again for your detailed response to my original question.

I just have a second brief follow-up question. In my original question, I was interested in the impact of a psychiatric treatment on two different treatment outcomes (Outcome “B" and Outcome “W") at two time points (time 1 and time 2). I have now come across a few studies that include an additional treatment arm (i.e., treatment 1 vs. placebo and treatment 2 vs. placebo) that I would like to include. 

Here is the updated data in long format (studies 30, 31, and 32 provide an additional treatment arm, thus providing an addition set of effect sizes and variances).

yi <- c(0.226, 0.191, 0.332, 0.231, -0.386, NA, 
         -0.421, NA, 0.179, 0.199, 0.129, -0.199, 0.17, 0.218, 0, 0, 3.137, 
         1.55, 2.836, 0.933, -0.069, 0.272, 0.267, 0.005, -0.149, -0.13, 
         0.114, 0.255, -0.12, NA, 0.051, NA, NA, 0.106, 0.207, 0.136, 
         -0.663, NA, 0.132, NA, 0.123, NA, 0.368, NA, 0.263, NA, 0.718, 
         NA, -0.408, -0.472, -0.131, -0.55, -0.539, 0.015, 0.267, 0.983, 
         -0.117, NA, 0.006, NA, -1.113, NA, -0.502, NA, 0, 0, -0.094, 
         0.043, 0.725, NA, 0.584, NA, -0.466, NA, 0.177, NA, -0.311, NA, 
         0.103, NA, 0.387, 0.568, 0, 0.099, 0.153, NA, 1.123, NA, -0.446, 
         1.145, 1.011, 1.076, -0.034, NA, 0.141, NA, 0.752, 0.657, 0.082, 
         0.366, 0.376, NA, 0.211, NA, 0.128, NA, -0.621, NA, -0.197, 0.241, 
         0.417, 0.417, -0.596, -0.552, 0.407, 0.417, -0.055, 0.281, -0.18, 
         -0.04, -0.218, -0.167, 0.161, 0.246, 0.283, NA, 0, NA, 0.469, 
         NA, 0.253, NA, -0.332, 0.902, -2.423, 0.423, -1.136, 0.439, -1.628, 
         -0.613)
 
vi <- c(0.043, 0.065, 0.043, 0.065, 0.114, NA, 0.114, 
         NA, 0.034, 0.034, 0.034, 0.034, 0.053, 0.059, 0.052, 0.058, 0.087, 
         0.056, 0.078, 0.048, 0.058, 0.049, 0.059, 0.049, 0.027, 0.033, 
         0.027, 0.033, 0.108, NA, 0.108, NA, NA, 0.03, 0.03, 0.03, 0.211, 
         NA, 0.2, NA, 0.104, NA, 0.106, NA, 0.104, NA, 0.109, NA, 0.227, 
         0.228, 0.223, 0.231, 0.198, 0.191, 0.193, 0.214, 0.417, NA, 0.417, 
         NA, 0.481, NA, 0.443, NA, 0.056, 0.059, 0.056, 0.059, 0.345, 
         NA, 0.338, NA, 0.137, NA, 0.134, NA, 0.239, NA, 0.236, NA, 0.075, 
         0.084, 0.073, 0.081, 0.05, NA, 0.058, NA, 0.035, 0.042, 0.038, 
         0.041, 0.076, NA, 0.076, NA, 0.07, 0.074, 0.066, 0.072, 0.082, 
         NA, 0.081, NA, 0.161, NA, 0.168, NA, 0.167, 0.122, 0.199, 0.199, 
         0.182, 0.202, 0.178, 0.199, 0.06, 0.038, 0.06, 0.037, 0.051, 
         0.038, 0.051, 0.038, 0.168, NA, 0.167, NA, 0.179, NA, 0.176, 
         NA, 0.035, 0.036, 0.059, 0.033, 0.04, 0.038, 0.045, 0.039)

study <- c(1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 
           5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 
           9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 
           12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 
           15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 
           19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 
           22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 
           25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 28, 28, 28, 
           28, 29, 29, 29, 29, 30, 30, 30, 30, 30, 30, 30, 30, 
           31, 31, 31, 31, 31, 31, 31, 31, 32, 32, 32, 32, 32, 
           32, 32, 32)

outcome <- rep(c("B", "B", "W", "W"), 35)
time <- rep(c("1", "2"), 70)
type <- rep(c(1,2,3,4), 35)

dat <- data.frame(yi, vi, study, outcome, time, type)

If I were to perform cluster-robust analysis, would the following script be correct in order to also account for the dependency of the two different treatment arm effects (both for outcome “B” and outcome “W) at both time points?

res <- rma.mv(yi, vi, mods = ~ outcome:factor(time) - 1, random = ~ factor(type) | study, struct="HCS", data=dat)
res
sav <- robust(res, cluster=dat$study)
sav

Many thanks,
Daniel


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