R/HierarchicalMetaAnalysis.R
computeHierarchicalMetaAnalysis.Rd
Compute a Bayesian hierarchical meta-analysis (two-level model) to learn the global effect with bias correction via negative control outcomes analysis. Bayesian inference is performed using the Markov chain Monte Carlo (MCMC) engine BEAST. Normal priors are used for the global effect, outcome-specific effects, and data-source-specific effects; a half normal prior is used for the standard deviation; a gamma prior is used for the precision parameters.
computeHierarchicalMetaAnalysis(
data,
settings = generateBayesianHMAsettings(),
alpha = 0.05,
seed = 1,
showProgressBar = TRUE
)
A data frame containing either normal, skew-normal, custom parametric, or grid likelihood data, with one row per database.
Model settings list generated by generateBayesianHMAsettings()
The alpha (expected type I error) used for the credible intervals.
Seed for the random number generator.
Showing a progress bar for MCMC?
A data frame with the point estimates, 95% credible intervals and sample standard errors for the (de-biased) global main effect, the average outcome effect, the average data source effect, and precision of random errors. Attributes of the data frame contain the MCMC trace and the detected approximation type.
data("hmaLikelihoodList")
estimates <- EvidenceSynthesis::computeHierarchicalMetaAnalysis(
data = hmaLikelihoodList,
seed = 666
)
#> Detected data following grid distribution
#> Detected data following grid distribution
#> Detected data following grid distribution
#> Detected data following grid distribution
#> Detected data following grid distribution
#> Data model list built!
#>
#> Performing MCMC. This may take a while
#> Detected data following grid distribution