plotCI {metavcov} | R Documentation |
Plot Confidence Intervals for a Meta-Analysis
Description
The function plot.CI
generates confidence interval figures for effect sizes from each study and the estimated effect sizes across studies.
Usage
plotCI(y, v,
name.y = NULL,
name.study = NULL,
y.all, y.all.se,
hline = 0,
up.bound = Inf, low.bound = -Inf,
return.data = FALSE)
Arguments
y |
A |
v |
A |
name.y |
A |
name.study |
A |
y.all |
A |
y.all.se |
A |
hline |
A |
up.bound |
A |
low.bound |
A |
return.data |
Should the data for the confidence interval plots be returned? |
Details
The difference between a forest plot and a confidence interval plot is that a forest plot requires a symbol on each confidence interval that is proportional to the weight for each study. Because the weighting mechanism in multivariate meta-analysis is too complex to be visualized, such a propositional symbol is omitted for multivariate meta-analysis.
Author(s)
Min Lu
References
Lu, M. (2023). Computing within-study covariances, data visualization, and missing data solutions for multivariate meta-analysis with metavcov. Frontiers in Psychology, 14:1185012.
Examples
######################################################
# Example: Craft2003 data
######################################################
data(Craft2003)
computvcov <- r.vcov(n = Craft2003$N,
corflat = subset(Craft2003, select = C1:C6),
method = "average")
y <- computvcov$ef
Slist <- computvcov$list.vcov
MMA_FE <- summary(metafixed(y = y, Slist = Slist))
obj <- MMA_FE
# pdf("CI.pdf", width = 4, height = 7)
plotCI(y = computvcov$ef, v = computvcov$list.vcov,
name.y = NULL, name.study = Craft2003$ID,
y.all = obj$coefficients[,1],
y.all.se = obj$coefficients[,2])
# dev.off()
######################################################
# Substitute obj for Random-effect model
######################################################
# library(mvmeta)
# S <- computvcov$matrix.vcov
# MMA_RE <- summary(mvmeta(cbind(C1, C2, C3, C4, C5, C6),
# S = S, data = y, method = "reml"))
# obj <- MMA_RE