fit_models_RA: Model fitting for reference analysis using 2 benchmarks:...

Description Usage Arguments Details Value Warning References See Also Examples


Computes the posterior distribution of the parameters in a random-effects meta-analysis (expressed as a normal-normal hierarchical model) for two benchmark heterogeneity priors and the actual heterogeneity prior(s) specified. Applies the function bayesmeta from the package bayesmeta.


fit_models_RA(df, tau.prior = list(), scale.hn0 = 1/500,
              mu.mean = 0, = 4, interval.type = "central")



data frame with one column "y" containing the (transformed) effect estimates for the individual studies and one column "sigma" containing the standard errors of these estimates.


list of prior specifications, which are either functions returning the probability densities of the actual priors of interest for the heterogeneity parameter tau or character strings specifying priors implemented in the bayesmeta function. See the documentation of the argument tau.prior of the bayesmeta function for details.


scale parameter of the half-normal benchmark prior (usually small, so that the benchmark is anti-conservative).


mean of the normal prior for the effect mu.

standard deviation of the normal prior for the effect mu.


the type of (credible, prediction, shrinkage) interval to be returned by default. Either "central" for equal-tailed intervals or "shortest" for shortest intervals. Defaults to "central". See also the corresponding argument in the bayesmeta function.


The two heterogeneity benchmark priors used are introduced in Ott et al. (2021, Section 3.4), where they are denoted by HN0 and J. Note that "J" refers to Jeffreys reference prior, which is improper, but leads to a proper posterior if there are at least two studies in the meta-analysis data set. HN0 is a half-normal prior with scale parameter scale.hn0.

Decreasing the scale parameter scale.hn0 of the half-normal benchmarks leads to a more anti-conservative (i.e. its mass is more concentrated near 0) HN0 benchmark prior. However, scale.hn0 cannot be chosen arbitrarily small since too small values lead to numerical problems in the bayesmeta function used to fit the models. To verify how anti-conservative the HN0 benchmark is, one can compare the marginal posterior for the overall mean parameter mu with the corresponding posterior for the fixed effects model, e.g. by using the function plot_RA. The better the match between these two marginal posteriors, the more anti-conservative the HN0 benchmark is.

The default values for mu.mean and are suitable for effects mu on the log odds (ratio) scale.


A list containing the model fits, namely a list of lists of class bayesmeta. This list has length 2 + length(tau.prior) and contains one element for each heterogeneity prior considered (2 benchmark priors and the actual priors specified), in the following order:


for the half-normal HN0 benchmark prior with scale parameter scale.hn0


for Jeffreys (improper) reference prior


for the first prior in the list tau.prior (if specified)


for the second prior in the list tau.prior (if specified)




for the nth prior in the list tau.prior (if specified)

See bayesmeta in the package bayesmeta for information on the structure of the lists of class bayesmeta.


If fit_models_RA ends with an error or warning, we recommend to increase the value of the parameter scale.hn0 for the anti-conservative benchmark prior.


Ott, M., Plummer, M., Roos, M. How vague is vague? How informative is informative? Reference analysis for Bayesian meta-analysis. Manuscript revised for Statistics in Medicine. 2021.

See Also

bayesmeta in the package bayesmeta, plot_RA, fit_models_RA_5bm


# for aurigular acupuncture (AA) data set 
# one actual half-normal and the "DuMouchel" heterogeneity prior
# it takes a few seconds to run this function
fit_models_RA(df=aa, tau.prior=list(function(t)dhalfnormal(t, scale=0.5),

ra4bayesmeta documentation built on April 23, 2021, 9:06 a.m.