post_RA: Posterior reference analysis based on a data frame using 2...

Description Usage Arguments Details Value Warning References See Also Examples

View source: R/post_RA.R


Computes a table of posterior estimates and informativeness values for the marginal posterior distributions of different parameters in the NNHM induced by the actual heterogeneity priors specified in tau.prior. Also provides the same estimates for the posterior benchmarks proposed in Ott et al. (2021).


post_RA(df, tau.prior = list(function(x) dhalfnormal(x, scale = 1)), = FALSE, 
        estimate = "median", ci.method = "central", 
        H.dist.method = "integral",
        scale.hn0 = 1/500, mu.mean = 0, = 4)



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.

logical. If TRUE, the estimates for the random effect parameters θ_i are also shown. Defaults to FALSE.


type of posterior point estimate. Either "median" for the posterior median or "mean" for the posterior mean. Defaults to "median".


method for computation of 95% credible intervals (CrIs). Either "central" for equal-tailed CrIs or "shortest" for shortest CrIs. Defaults to "central".


method for computation of Hellinger distances between marginal posterior densities. Either "integral" for integral-based computation or "moment" for approximate moment-based calculation using a normal approximation. Defaults to "integral".


scale parameter of the half-normal benchmark prior (usually a small number to obtain an anti-conservative benchmark which has most of its probability mass close to 0). Defaults to 0.002.


mean of the normal prior for the effect mu. Defaults to 0.

standard deviation of the normal prior for the effect mu. Defaults to 4.


The two posterior benchmarks used are introduced in Ott et al. (2021, Section 3.4), where they are denoted by po_{J}(Ψ) and po_{HN0}(Ψ). Here, Ψ \in \{ μ, τ, θ_1, ..., θ_k, θ_{new} \} denotes the parameter of interest in the NNHM, where θ_{i} is the random effect in the ith study and θ_{new} the predicted effect for a new study. For the overall mean parameter μ, we additionally consider the fixed-effects model benchmark po_{FE}(μ).

Note that Jeffreys reference posterior po_{J} is proper if there are at least two studies in the meta-analysis data set. It is based on the improper Jeffreys reference prior, which is minimally informative given the data. The computation of the informativeness values is described in Ott et al. (2021, Section 3.6).

The absolute value of the signed informativeness quantifies how close the actual posterior and the reference posterior po_{J} are. If the signed informativeness is negative, then the actual prior is anti-conservative with respect to Jeffreys reference prior J (that is puts more weight on smaller values for τ than J). If the signed informativeness is positive, then the actual prior is conservative with respect to Jeffreys reference prior J (that is puts more weight on larger values for τ than J).

If integral-based computation (H.dist.method = "integral") of Hellinger distances is selected (the default), numerical integration is applied to obtain the Hellinger distance between the two marginal posterior densities (by using the function H). If moment-based computation (H.dist.method = "moment") is selected, the marginal densities are first approximated by normal densities with the same means and standard deviations and then the Hellinger distance between these normal densities can be obtained by an analytical formula (implemented in the function H_normal).

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


A matrix with 6 columns and a number of columns depending on the number of actual heterogeneity priors specified and the parameters of interests in the NNHM (if = FALSE, then there are 3 parameters of interest (μ, τ, θ_{new}) and the matrix has 3*(n+2)+1 rows, where where n=length(tau.prior) is the number of actual heterogeneity priors specified; if = TRUE, then the matrix has (k+3)*(n+2)+1 rows, where k is the number of studies in the meta-analysis data set (so that there are k+3 parameters of interest).)

The row names specify the parameter in the NNHM for which the marginal posterior is considered, followed by the heterogeneity prior used to compute that posterior. HN0, J and FE denote the three benchmark priors introduced in Ott et al. (2021). pri_act_i denotes the i-th prior in the tau.prior list.

The 6 columns provide the following estimates:


posterior point estimate (median or mean)


lower limit of the 95% credible interval


upper limit of the 95% credible interval


length of the 95% credible interval

H(po_HN0, po_act)

Hellinger distance between the posterior benchmark po_{HN0}(Ψ) and the marginal posterior induced by the heterogeneity prior listed on the left, for the parameter Ψ listed on the left


Signed informativeness, i.e. sign(H(po_{HN0}, po_{act}) - H(po_{HN0}, po_{J})) H(po_{act}, po_{J}), for the marginal posterior induced by the heterogeneity prior listed on the left, for the parameter Ψ listed on the left


If the integral-based method is used to compute Hellinger distances (H.dist.method = "integral"), numerical problems may occur in some cases, which may lead to implausible outputs. Therefore, we generally recommend to double-check the results of the integral-based method using the moment-based method (H.dist.method = "moment") - especially if the former results are implausibe. If large differences between the two methods are observed, we recommend to rely on the moment-based method unless a normal approximation of the involved densities is inappropriate.


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

post_RA_fits, post_RA_3bm


# for aurigular acupuncture (AA) data set with two
# actual half-normal heterogeneity priors
# it takes a few seconds to run this function
post_RA(df=aa, tau.prior=list(function(t)dhalfnormal(t, scale=0.5),
                              function(t)dhalfnormal(t, scale=1)))

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