Learn R Programming

BayesMultMeta - Bayesian Multivariate Meta-Analysis

This package implements the methods developed in [1]

To simulate samples from the posterior using the methods developed in the paper you simply need to run


set.seed(2021)
dataREM<-mvmeta::hyp
# Observation matrix X
X<-t(cbind(dataREM$sbp,dataREM$dbp))
p<-nrow(X) # model dimension
n<-ncol(X) # sample size
# Matrix U
U<-matrix(0,n*p,n*p)
for (i_n in 1:n) {
  Use<-diag(c(dataREM$sbp_se[i_n],dataREM$dbp_se[i_n]))
  Corr_mat<-matrix(c(1,dataREM$rho[i_n],dataREM$rho[i_n],1),p,p)
  U[(p*(i_n-1)+1):(p*i_n),(p*(i_n-1)+1):(p*i_n)]<- Use%*%Corr_mat%*%Use
}
bmgmr_run <- BayesMultMeta(X, U, 1e4, burn_in = 100,
                   likelihood = "normal", prior="jeffrey",
                   algorithm_version = "A")
summary(bmgmr_run)

References

[1] Olha Bodnar, Taras Bodnar (2021). Objective Bayesian meta-analysis based on generalized multivariate random effects model. Under revision in Bayesian analysis.

Copy Link

Version

Install

install.packages('BayesMultMeta')

Monthly Downloads

199

Version

0.1.1

License

MIT + file LICENSE

Maintainer

Erik Thors<c3><a9>n

Last Published

June 9th, 2022

Functions in BayesMultMeta (0.1.1)

sample_post_t_ref_marg_Psi

Metropolis-Hastings algorithm for the t-distribution and Berger and Bernardo reference prior, where \(\mathbf{\Psi}\) is generated from the marginal posterior.
sample_post_t_jef_marg_mu

Metropolis-Hastings algorithm for the t-distribution and the Jeffreys prior, where \(\mathbf{\mu}\) is generated from the marginal posterior.
bayes_inference

Summary statistics from a posterior distribution
duplication_matrix

Duplication matrix
split_rank_hatR

Computes the split-\(\hat{R}\) estimate based on the rank normalization
sample_post_t_ref_marg_mu

Metropolis-Hastings algorithm for the t-distribution and Berger and Bernardo reference prior, where \(\mathbf{\mu}\) is generated from the marginal posterior.
BayesMultMeta

Interface for the BayesMultMeta class
MC_ranks

Computes the ranks within the pooled draws of Markov chains
sample_post_nor_ref_marg_mu

Metropolis-Hastings algorithm for the normal distribution and the Berger and Bernardo reference prior, where \(\mathbf{\mu}\) is generated from the marginal posterior.
summary.BayesMultMeta

Summary statistics from the posterior of a BayesMultMeta class
sample_post_t_jef_marg_Psi

Metropolis-Hastings algorithm for the t-distribution and the Jeffreys prior, where \(\mathbf{\Psi}\) is generated from the marginal posterior.
sample_post_nor_jef_marg_mu

Metropolis-Hastings algorithm for the normal distribution and the Jeffreys prior, where \(\mathbf{\mu}\) is generated from the marginal posterior.
sample_post_nor_jef_marg_Psi

Metropolis-Hastings algorithm for the normal distribution and the Jeffreys prior, where \(\mathbf{\Psi}\) is generated from the marginal posterior.
sample_post_nor_ref_marg_Psi

Metropolis-Hastings algorithm for the normal distribution and the Berger and Bernardo reference prior, where \(\mathbf{\Psi}\) is generated from the marginal posterior.
plot.BayesMultMeta

Plot a BayesMultMeta object