[R-meta] Comparing estimates of independent subgroups

Martineau, Roger (AAFC/AAC) roger@m@rt|ne@u @end|ng |rom c@n@d@@c@
Tue Jan 15 14:54:13 CET 2019


Dear list members,

I apologize for the length of this request but this is an issue raised by a reviewer for which I have no definite answer.

In http://www.metafor-project.org/doku.php/tips:comp_two_independent_estimates, Dr. Viechtbauer describes how to compare summary estimates obtained from 3 independent subgroups of studies. In the example, the categorical variable “alloc” is dichotomized into “random” and “other” and RR from each category are compared using 1) a procedure similar to conducting a Wald test, and the rma.mv function allowing the residual heterogeneity to differ in random and other studies.

In animal science, the data set often include studies in which the levels of a categorical variable of interest are not evaluated in the same study. For example, a subgroup of studies could have been conducted in Ayrshire cows and another subgroup of studies could have used Holstein cows. Ayrshire and Holstein cows are 2 different breeds of dairy cows which may respond differently to a dietary treatment: the infusion of casein may increase milk yield (MY) to a greater extent in Holstein cows versus Ayrshire cows. My first question is about the validity of comparing the slopes of casein between breed (MY = casein * breed), even if no study used the 2 breeds to test the effect of casein; and how to do it?.

Can I use the approach in http://www.metafor-project.org/doku.php/tips:comp_two_independent_estimates , and compare “year” according to “alloc” (i.e., year*alloc)?.

library(metafor)
dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
dat$alloc <- ifelse(dat$alloc == "random", "random", "other")
dat

### I added moderator year in the model:
res1 <- rma(yi, vi, mods = ~ year, data=dat, subset=alloc=="random")
res2 <- rma(yi, vi, mods = ~ year, data=dat, subset=alloc=="other")

### The following script needs to be fixed in order to compare the estimates of year:
dat.comp <- data.frame(estimate = c(coef(res1), coef(res2)), stderror = c(res1$se, res2$se),
                       meta = c("random","other"), tau2 = round(c(res1$tau2, res2$tau2),3))
dat.comp
rma(estimate, sei=stderror, mods = ~ meta, method="FE", data=dat.comp, digits=3)
with(dat.comp, round(c(zval = (estimate[1] - estimate[2])/sqrt(stderror[1]^2 + stderror[2]^2)), 3))


### The final model could be:
rma.mv(yi, vi, mods = ~ year * alloc, random = ~ alloc | trial, struct="DIAG", data=dat, digits=3)
rma.mv(yi, vi, mods = ~ alloc-1 + year : alloc, random = ~ alloc | trial, struct="DIAG", data=dat, digits=3)
### The slopes of year do not differ (P = 0.552) between random and other.

Finally, I cannot use this approach for a multilevel model because we get this error message:
Cannot use '~ inner | outer1/outer2' type terms in the 'random' argument. Can this be fixed ?

Best regards,

Roger ☺

Roger Martineau, mv Ph.D.
Nutrition et Métabolisme des ruminants
Centre de recherche et de développement
sur le bovin laitier et le porc
Agriculture et agroalimentaire Canada/Agriculture and Agri-Food Canada
Téléphone/Telephone: 819-780-7319
Télécopieur/Facsimile: 819-564-5507
2000, Rue Collège / 2000, College Street
Sherbrooke (Québec)  J1M 0C8
Canada
roger.martineau using canada.ca<mailto:roger.martineau using canada.ca>

[cid:image001.jpg using 01D4679E.125DD520]



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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2370 bytes
Desc: image001.jpg
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20190115/08a4d2fd/attachment.jpg>


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