# post_RA_3bm: Posterior reference analysis based on a data frame using 3... In ra4bayesmeta: Reference Analysis for Bayesian Meta-Analysis

## Description

Computes a table of Hellinger distances between marginal posterior distributions for different parameters in the NNHM induced by the actual heterogeneity priors specified in tau.prior and posterior benchmarks proposed in the Supplementary Material of Ott et al. (2021).

## Usage

 1 2 3 4 post_RA_3bm(df, tau.prior=list(function(x) dhalfnormal(x, scale=1)), H.dist.method = "integral", m_inf=NA, M_inf=NA, rlmc0=0.0001, rlmc1=0.9999, mu.mean=0, mu.sd=4) 

## Arguments

 df 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. tau.prior 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.
 H.dist.method 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". m_inf parameter value m=m_{inf} of the SGC(m) prior, such that the median relative latent model complexity (RLMC) is close to 0. If set to NA (the default), this parameter is computed using the function m_inf_sgc, such that the median RLMC is approximately equal to rlmc0. M_inf parameter value M=M_{inf} of the SIGC(M) prior, such that the median relative latent model complexity (RLMC) is close to 1. If set to NA (the default), this parameter is computed using the function M_inf_sigc, such that the median RLMC is approximately equal to rlmc1. rlmc0 RLMC target value for the SGC(m_{inf}) benchmark prior (typically close to 0). Is required only if m_inf=NA. rlmc1 RLMC target value for the SIGC(M_{inf}) benchmark prior (typically close to 1). Is required only if M_inf=NA. mu.mean mean of the normal prior for the effect mu. mu.sd standard deviation of the normal prior for the effect mu.

## Details

The three posterior benchmarks used are introduced in the Supplementary Material of Ott et al. (2021, Sections 2.2.1 and 2.5, see also Section 3.4 in Ott at al. (2021) for Jeffreys reference prior), where they are denoted by po_{m_{inf}}(Ψ), po_{J}(Ψ) and po_{M_{inf}}(Ψ). 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.

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.

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 mu.sd are suitable for effects mu on the log odds (ratio) scale.

## Value

A list with two elements: The first element named "table" is a matrix containing the Hellinger distance estimates and the second element called "par" is a named vector giving the parameter values of the benchmark priors. The vector "par" has the following three components: m_inf, M_inf and C.

The matrix "table" contains the Hellinger distance estimates between marginal posteriors and has 3 columns and n*(k+3) rows, where n=length(tau.prior) is the number of actual heterogeneity priors specified and k is the number of studies in the meta-analysis data set (so that there are k+3 parameters of interest).

The columns of the matrix give the following Hellinger distance estimates between two marginal posteriors (for the parameter of interest Ψ varying with rows) induced by the following two heterogeneity priors (from left to right):

 H(po_m_inf, po_act)  benchmark prior SGC(m_inf) and actual prior H(po_J, po_act)  Jeffreys reference prior π_J and actual prior H(po_M_inf, po_act)  benchmark prior SIGC(M_inf) and actual prior

The actual heterogenity prior and the parameter of interest Ψ vary with the rows in the following order:

 mu, pri_act_1  Ψ=μ and first actual prior in tau.prior mu, pri_act_2  Ψ=μ and second actual prior in tau.prior ...  mu, pri_act_n  Ψ=μ and nth actual prior in tau.prior tau, pri_act_1  Ψ=τ and first actual prior in tau.prior ...  tau, pri_act_n  Ψ=τ and nth actual prior theta_1, pri_act_1  Ψ=θ_1 and first actual prior ...  theta_k, pri_act_n  Ψ=θ_k and nth actual prior theta_new, pri_act_1  Ψ=θ_{new} and first actual prior ...  theta_new, pri_act_n  Ψ=θ_{new} and nth actual prior

## Warnings

A warning message will be displayed if one of the parameters m_inf or M_inf has a value larger than 5*10^6, since this may lead to numerical problems in the bayesmeta function used for computation of the marginal posteriors.

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.

## References

Ott, M., Plummer, M., Roos, M. Supplementary Material: How vague is vague? How informative is informative? Reference analysis for Bayesian meta-analysis. Revised for Statistics in Medicine. 2021.

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.

post_RA_fits, pri_RA_5bm
 1 2 3 4 5 6 # for aurigular acupuncture (AA) data set with two # actual half-normal heterogeneity priors data(aa) # it takes several seconds to run this function post_RA_3bm(df=aa, tau.prior=list(function(t)dhalfnormal(t, scale=0.5), function(t)dhalfnormal(t, scale=1)))