# post_RA_fits: Posterior reference analysis based on bayesmeta fits 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 between the actual model fits in fits.actual and the benchmark fits in fits.bm. All fits should be based on the same data set.

## Usage

 1 2 post_RA_fits(fits.actual, fits.bm, H.dist.method = "integral") 

## Arguments

 fits.actual a list of model fits of class bayesmeta, computed with the bayesmeta function in the package bayesmeta. fits.bm a list of model fits of class bayesmeta, computed with the bayesmeta function in the package bayesmeta. To be used as benchmarks. 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".

## Details

Two alternative suggestions for posterior benchmarks are provided in Ott et al. (2021, Section 3.4) and its Supplementary Material (Section 2.5) and they can be computed using the functions fit_models_RA and fit_models_RA_5bm, respectively.

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).

## Value

A matrix of Hellinger distance estimates between marginal posteriors with n.bm columns and n.act*(k+3) rows, where n.bm=length(fits.bm) is the number of benchmark fits specified, n.act=length(fits.actual) the number of actual fits specified and k the number of studies in the meta-analysis data set (so that there are k+3 parameters Ψ \in \{ μ, τ, θ_1, ..., θ_k, θ_{new} \} of potential interest in the NNHM).

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_bm_1, po_act)  first benchmark prior bm_1 inducing the fit fits.bm[[1]] and actual prior H(po_bm_2, po_act)  second benchmark prior bm_2 inducing the fit fits.bm[[2]] and actual prior ...  ... H(po_bm_n.bm, po_act)  last benchmark prior bm_n.bm inducing the fit fits.bm[[n.bm]] 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

## Warning

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. How vague is vague? How informative is informative? Reference analysis for Bayesian meta-analysis. Manuscript revised for Statistics in Medicine. 2021.

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.

bayesmeta in the package bayesmeta, fit_models_RA, post_RA, pri_RA_fits
  1 2 3 4 5 6 7 8 9 10 11 # for aurigular acupuncture (AA) data set data(aa) # compute the model fits % this example takes > 5 sec. to run # actual standard half-normal and half-Cauchy heterogeneity priors fits <- fit_models_RA(df=aa, tau.prior= list(function(t)dhalfnormal(t, scale=1), function(t)dhalfcauchy(t, scale=1))) # benchmark fits under HN0 and J (Jeffreys) priors fits.bm.post <- fits[c(1,2)] fits.actual <- fits[c(3,4)] post_RA_fits(fits.actual=fits.actual, fits.bm=fits.bm.post)