Description Usage Arguments Details Value Author(s) References See Also Examples

Generates a forest plot, and joint and marginal posterior density plots for the two parameters of the random-effects meta-analysis model.

1 2 3 4 5 |

`x` |
a |

`main` |
a |

`which` |
an indicator of which plots to generate. |

`prior` |
an indicator whether to also draw the prior density in marginal posterior density plots. |

`forest.margin` |
the width of the margin to the left of the forest plot. This may require some manual tweaking so that the study labels fit properly. |

`mulim, taulim` |
(optional) ranges of effect (mu) and heterogeneity (tau) values to be used for plotting. |

`violin` |
an indicator whether to draw the forest plot as a “violin plot”. |

`...` |
other graphical parameters. |

Depending on the value of the `which`

argument, one or several
plots are generated, namely

a forest plot, including a 95% credibility interval (diamond) and a 95% prediction interval (rectangle) for the effect

*μ*. The shown intervals for*μ*are based on posterior medians and shortest credibility intervals (from`x$summary`

). If`violin=TRUE`

, the forest plot is plotted as a “violin plot”, i.e., via Gaussian densities for the estimates*y[i]*(and their associated uncertainties), and the posterior densities for the effect*μ*, and for the predictive distribution.a plot of the joint posterior density of heterogeneity (

*τ*) and effect (*μ*). Red lines trace the contours of constant density corresponding to approximate 2D credibility regions (based on a*χ^2*-approximation to the logarithmic posterior density) as labelled. The credibility regions are only an approximation based on a ‘well-behaved’, unimodal posterior; contour lines are omitted if the posterior mode is not finite. Blue lines show the conditional mean effect*μ*as a function of the heterogeneity*τ*(solid line) along with conditional 95% confidence bounds (dashed lines). Green lines indicate marginal medians and shortest 95% credibility intervals for*τ*and*μ*.the marginal posterior probability density of the effect

*μ*with median and shortest 95% credibility interval indicated. Depending on the`prior`

argument, a dashed line showing the prior density is added. Note that for improper priors the scaling is arbitrary and may be inappropriate for the plot.the marginal posterior probability density of the heterogeneity

*τ*with median and shortest 95% credibility interval indicated. Depending on the`prior`

argument, a dashed line showing the prior density is added. Note that for improper priors the scaling is arbitrary and may be inappropriate for the plot.

The joint posterior density plot (2) especially highlights the dependence
of the effect estimate on the heterogeneity parameter. In a
‘conventional’ frequentist meta-analysis, one would commonly first
estimate the heterogeneity *τ*, and then fix this value and
estimate the effect *μ* based on the assumption that the
heterogeneity estimate was the true value. In the joint density plot,
this would correspond to considering vertical “slices” of the
parameter space, a slice at *τ=0* for the fixed-effects model,
and a slice a a different *τ* value for the random-effects
model, where the blue lines would then indicate the corresponding
estimate and confidence interval for *μ*.

Note that when using the `prior=TRUE`

argument, the added line
may end up be outside the plotted range, especially when using
improper priors with arbitrary normalisation (consider adding it
“manually” instead).

Returns the supplied `bayesmeta`

object (`x`

).

Christian Roever [email protected]

C. Guddat, U. Grouven, R. Bender and G. Skipka.
A note on the
graphical presentation of prediction intervals in random-effects
meta-analyses. *Systematic Reviews*, **1**(34), 2012.

R.D. Riley, J.P. Higgins and J.J. Deeks.
Interpretation of random effects meta-analyses.
*BMJ*, **342**:d549, 2011.

`bayesmeta`

, `forestplot.bayesmeta`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
## Not run:
# example data by Snedecor and Cochran:
data("SnedecorCochran")
# analyze using a weakly informative prior
# (may take a few seconds to compute!):
ma <- bayesmeta(y=SnedecorCochran[,"mean"], sigma=sqrt(SnedecorCochran[,"var"]),
label=SnedecorCochran[,"no"],
mu.prior.mean=50, mu.prior.sd=50,
tau.prior=function(x){dhalfcauchy(x, scale=10)})
# show some plots:
plot(ma, main="Snedecor/Cochran data", prior=TRUE)
plot(ma, main="Snedecor/Cochran data", which=1, violin=TRUE)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.