post_RA_fits: Posterior reference analysis based on bayesmeta fits

View source: R/post_RA_fits.R

post_RA_fitsR Documentation

Posterior reference analysis based on bayesmeta fits

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

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 \Psi \in \{ \mu, \tau, \theta_1, ..., \theta_k, \theta_{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 \Psi 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 \Psi vary with the rows in the following order:

mu, pri_act_1:

\Psi=\mu and first actual prior in tau.prior

mu, pri_act_2:

\Psi=\mu and second actual prior in tau.prior

...

...

mu, pri_act_n:

\Psi=\mu and nth actual prior in tau.prior

tau, pri_act_1:

\Psi=\tau and first actual prior in tau.prior

...

...

tau, pri_act_n:

\Psi=\tau and nth actual prior

theta_1, pri_act_1:

\Psi=\theta_1 and first actual prior

...

...

theta_k, pri_act_n:

\Psi=\theta_k and nth actual prior

theta_new, pri_act_1:

\Psi=\theta_{new} and first actual prior

...

...

theta_new, pri_act_n:

\Psi=\theta_{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. (2021). How vague is vague? How informative is informative? Reference analysis for Bayesian meta-analysis. Statistics in Medicine 40, 4505–4521. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.9076")}

Ott, M., Plummer, M., Roos, M. (2021). Supplementary Material: How vague is vague? How informative is informative? Reference analysis for Bayesian meta-analysis. Statistics in Medicine. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sim.9076")}

See Also

bayesmeta in the package bayesmeta, fit_models_RA, post_RA, pri_RA_fits

Examples

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


ra4bayesmeta documentation built on Oct. 7, 2023, 1:07 a.m.