# \donttest{
data(cdp)
# produce all 3 models for the CDP data and plot them all
cdp1 <- metaplus(yi, sei, plotci = TRUE, slab = study, cores = 1, data = cdp)
cdp2 <- metaplus(yi, sei, plotci = TRUE, slab = study, random = "t-dist", cores = 1, data = cdp)
cdp3 <- metaplus(yi, sei, plotci = TRUE, slab = study, random = "mixture", cores = 1, data = cdp)
plot(cdp1, extrameta = list(cdp2, cdp3))
# plot effect of exercise on depression at 4, 8 and 12 weeks
data(exercise)
exercise$duration4 <- exercise$duration-4
exercise$duration8 <- exercise$duration-8
exercise$duration12 <- exercise$duration-12
exercise.wk4 <- metaplus(smd, sqrt(varsmd), mods = duration4,
label = "Random Mixture (Week 4)", slab = study, random = "mixture", cores = 1, data = exercise)
exercise.wk8 <- metaplus(smd, sqrt(varsmd), mods = duration8,
label = "Random Mixture (Week 8)", slab = study, random = "mixture", cores = 1, data = exercise)
exercise.wk12 <- metaplus(smd, sqrt(varsmd), mods = duration12,
label = "Random Mixture (Week 12)", slab = study, random = "mixture", cores = 1, data = exercise)
exercise.nodurn <- metaplus(smd, sqrt(varsmd), plotci = TRUE,
label = "Random Mixture (No Duration)", slab = study, random = "mixture",
cores = 1, data = exercise)
plot(exercise.nodurn, extrameta = list(exercise.wk4, exercise.wk8, exercise.wk12))
# }
Run the code above in your browser using DataLab