traceplot {bayesmeta} | R Documentation |
Generates a trace plot of overall mean effect and study-specific (shrinkage) estimates as a function of the heterogeneity (τ). The heterogeneity's posterior distribution is also indicated.
traceplot(x, ...) ## S3 method for class 'bayesmeta' traceplot(x, mulim, taulim, ci=FALSE, ylab="effect", rightmargin=8, col=rainbow(x$k), ...) ## S3 method for class 'bmr' traceplot(x, mulim, taulim, ci=FALSE, ylab="effect", rightmargin=8, col=rainbow(x$k), ...)
x |
|
mulim, taulim |
(optional) ranges for the effect (mu) and
heterogeneity (tau) axes. If only one value is given for
|
ci |
a logical flag indicating whether to also show (conditional) confidence intervals. |
ylab |
a y-axis label. |
rightmargin |
an additional margin to be added to the right side of the plot, in order to accomodate the estimates' labels. In case study labels still extend beyond the figure margin, try increasing this number. |
col |
colors to be used for plotting the (k) estimates. |
... |
other arguments passed on to the
|
For a given heterogeneity (τ) value, the conditional posterior distributions of the overall effect (μ) as well as the study-specific parameters (theta[i]) are again normal. The conditional normal moments (mean and variance) then vary as functions of the heterogeneity; for large heterogeneity, the shrinkage estimates approach the original data (y[i]), while the overall mean approaches an un-weighted overall average. For small heterogeneity, both overall mean as well as study-specific estimates are increasingly shrunk towards the inverse-variance-weighted ‘common-effect’ estimate (Roever, 2020).
This trace plot illustrates the conditional (overall and study-specific) estimates along with the heterogeneity's posterior distribution (density) in a layout similar to that utilized by Rubin (1981).
Christian Roever christian.roever@med.uni-goettingen.de
C. Roever. Bayesian random-effects meta-analysis using the bayesmeta R package. Journal of Statistical Software, 93(6):1-51, 2020. doi: 10.18637/jss.v093.i06.
C. Roever, T. Friede. Using the bayesmeta R package for Bayesian random-effects meta-regression. arXiv preprint 2209.06004, 2022.
D.B. Rubin. Estimation in parallel randomized experiments. Journal of Educational Statistics, 6(4):377-401, 1981. doi: 10.3102/10769986006004377.
# load example data: data("Rubin1981") ## Not run: # perform meta-analysis: ma01 <- bayesmeta(y=Rubin1981[,"effect"], sigma=Rubin1981[,"stderr"], labels=Rubin1981[,"school"], tau.prior="uniform") # show meta-analysis results: forestplot(ma01) # show trace plot: traceplot(ma01) ## End(Not run)