weightsplot | R Documentation |
bayesmeta
object.
Generates a bar plot showing individual estimates' posterior mean weights, either for the overall mean estimate, or for a shrinkage estimate.
weightsplot(x, ...)
## S3 method for class 'bayesmeta'
weightsplot(x, individual=FALSE, ordered=TRUE,
extramargin=4, priorlabel="prior mean", main, xlim, ...)
x |
a |
individual |
this argument allows to request weights for individual
shrinkage estimates. If |
ordered |
a logical flag indicating whether to sort weights by their magnitude. |
extramargin |
an additional margin to be added to the left side of the plot, in
order to accomodate the estimates' labels. The value will be added
to the 2nd element of the margin settings given by
‘ |
priorlabel |
the label for the effect prior's weight. Only relevant for proper effect priors. |
main |
the plot's main title. |
xlim |
the x-axis range. |
... |
other arguments passed on to the
|
The individual estimates' contributions to the overall mean estimate are commonly illustrated in terms of weights, as the resulting overall estimate may be expressed as a weighted average of the estimates contributing to the analysis. The notion of “study weights” may also be extended to the Bayesian setting, where these result as posterior mean weights. Analogous weights may also be derived for shrinkage estimates (Roever and Friede, 2021).
This function generates a simple bar plot illustrating the
posterior mean weights. The actual numbers are taken from the
bayesmeta
object's “$weights
” or
“$weights.theta
” elements.
Christian Roever christian.roever@med.uni-goettingen.de
C. Roever, T. Friede. Bounds for the weight of external data in shrinkage estimation. Biometrical Journal, 65(5):1131-1143, 2021. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/bimj.202000227")}.
bayesmeta
.
# load example data:
data("Peto1980")
## Not run:
# compute effect sizes (log odds ratios) from count data:
require("metafor")
peto.es <- escalc(measure="OR",
ai=treat.events, n1i=treat.cases,
ci=control.events, n2i=control.cases,
slab=publication, data=Peto1980)
# perform meta-analysis:
ma01 <- bayesmeta(peto.es)
# show data and results:
forestplot(ma01)
# check out weights:
ma01$weights
ma01$weights.theta
# illustrate weights:
weightsplot(ma01)
weightsplot(ma01, ordered=FALSE)
weightsplot(ma01, ordered=FALSE, individual="BrMedJ1974")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.