[R-meta] Comparison of estimates from 2 independent datasets when there are 3 variance components
Martineau, Roger
Roger.Martineau at AGR.GC.CA
Tue Apr 3 21:09:17 CEST 2018
Dear list members,
I would like to compare the estimates from 2 independent subgroups (or datasets) in a way similar to http://www.metafor-project.org/doku.php/tips:comp_two_independent_estimates using a multilevel approach with 3 levels of variance components. Next is small dataset example but similar to a large dataset with 200 treatments.
Thanks in advance,
Roger ☺
Data are from 2 independent datasets (A and B): 3 publications (Pub 1 to 3) in dataset A and 4 publications (Pub 4 to 7) in dataset B.
Each publication reports 2 experiments which contain the results of 2 treatments testing the effect of dosage on an outcome.
Raw treatment means and the corresponding SEM are reported in each line of this fictional dataset (fict.dat).
fict.dat <- data.frame(
dataset=c("A","A","A","A","A","A","A","A","A","A","A","A",
"B","B","B","B","B","B","B","B","B","B","B","B","B","B","B","B"),
publication=c("Pub1","Pub1","Pub1","Pub1","Pub2","Pub2","Pub2","Pub2",
"Pub3","Pub3","Pub3","Pub3","Pub4","Pub4","Pub4","Pub4",
"Pub5","Pub5","Pub5","Pub5","Pub6","Pub6","Pub6","Pub6",
"Pub7","Pub7","Pub7","Pub7"),
experiment=c("exp1","exp1","exp2","exp2","exp3","exp3","exp4","exp4",
"exp5","exp5","exp6","exp6","exp7","exp7","exp8","exp8",
"exp9","exp9","exp10","exp10","exp11","exp11","exp12","exp12",
"exp13","exp13","exp14","exp14"),
outcome=c(10,18,5,25,13,48,7,25, 6,13,20,35,65,45,30,15,
55,45,30,10,45,40,35,30,35,26,18,8),
SEM=c(5,5,6,6,7,7,3,3,7,7,7,7,6,6,6,6,5,5,5,5,6,6,6,6,5,5,5,5),
dosage=c(5,10,5,15,8,30,5,35, 5,30,15,20,30,20,25,20,30,20,75,
50,30,15,50,25,25,16,29,12))
fict.dat$ID <- 1:nrow(fict.dat)
I would like to get the summary estimates in each independent dataset and compare the estimates using a meta-regression with all studies allowing the amount of residual heterogeneity to be different in each independent dataset.
1) Fitting separate rma.mv models with 3 levels of variance components (res.dataset.A and res.dataset.B)
a. Experiment is nested in publication
b. SEM^2 = sampling variances for raw means (this is OK, isn’t it?)
c. random = ~1|publication/experiment/ID (true outcomes might not be homogeneous within each level of experiment within publication)
d. I know each model can include only 2 levels of variance components because that for publication is zero but this is not the case in the large dataset.
2) Comparison of estimates
a. res.1 does not work because “Only up to two '~ inner | outer' formulas allowed in the 'random' argument”
b. res.2 (and res.3) is to be the best option to reproduce results from res.dataset.A and res.dataset.B.
c. Because the variance component of publication is quite different from zero in the large dataset, is there a way to compare the estimates when there are 3 levels in the random argument?
Models:
res.dataset.A <- rma.mv(outcome, SEM^2, data=subset(fict.dat, dataset == "A"),
mods = ~
dosage,
random = ~1|publication/experiment/ID,
method = "REML")
summary(res.dataset.A)
res.dataset.B <- rma.mv(outcome, SEM^2, data=subset(fict.dat, dataset == "B"),
mods = ~
dosage,
random = ~1|publication/experiment/ID,
method = "REML")
summary(res.dataset.B)
res.1 <- rma.mv(outcome, SEM^2, data=fict.dat,
mods = ~
factor(dataset)*dosage,
random = list(~ factor(dataset) | publication,
~ factor(dataset) | experiment,
~ factor(dataset) | ID),
struct= c("DIAG","DIAG","DIAG"), digits=4)
summary(res.1)
robust(res.1, fict.dat$publication)
res.2 <- rma.mv(outcome, SEM^2, data=fict.dat,
mods = ~
factor(dataset)*dosage,
random = list(~ factor(dataset) | experiment,
~ factor(dataset) | ID),
struct= c("DIAG","DIAG"), digits=4)
summary(res.2)
res.3 <- rma.mv(outcome, SEM^2, data=fict.dat,
mods = ~
factor(dataset)-1 +
factor(dataset):dosage,
random = list(~ factor(dataset) | experiment,
~ factor(dataset) | ID),
struct= c("DIAG","DIAG"), digits=4)
summary(res.3)
Roger Martineau, mv Ph.D.
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 at agr.gc.ca<mailto:roger.martineau at agr.gc.ca>
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis
mailing list