Learn R Programming

bayesmeta (version 2.6)

bayesmeta-package: Bayesian Random-Effects Meta-Analysis

Description

Description: A collection of functions allowing to derive the posterior distribution of the two parameters in a random-effects meta-analysis, and providing functionality to evaluate joint and marginal posterior probability distributions, predictive distributions, shrinkage effects, posterior predictive p-values, etc.

Arguments

Details

Package: bayesmeta
Type: Package
Version: 2.6
Date: 2020-12-14

The main functionality is provided by the bayesmeta() function. It takes the data (estimates and associated standard errors) and prior information (effect and heterogeneity priors), and returns an object containing functions that allow to derive posterior quantities like joint or marginal densities, quantiles, etc.

References

C. Roever. Bayesian random-effects meta-analysis using the bayesmeta R package. Journal of Statistical Software, 93(6):1-51, 2020.

See Also

forestplot.bayesmeta, plot.bayesmeta.

Examples

Run this code
# NOT RUN {
# example data by Snedecor and Cochran:
data("SnedecorCochran")

# }
# NOT RUN {
# analysis using improper uniform prior
# (may take a few seconds to compute!):
bma <- bayesmeta(y=SnedecorCochran[,"mean"],
                 sigma=sqrt(SnedecorCochran[,"var"]),
                 label=SnedecorCochran[,"no"])

# show some summary statistics:
bma

# show a bit more details:
summary(bma)

# show a forest plot:
forestplot(bma)

# show some more plots:
plot(bma)
# }

Run the code above in your browser using DataLab