Description Usage Arguments Details Value Warning See Also Examples

Computes the Hellinger distance between the marginal posterior densities extracted from two bayesmeta fits, for the selected parameter of interest. Offers the option to select between integral-based and approximate moment-based computation of Hellinger distances.

1 2 |

`fit1` |
first model fit of class bayesmeta, computed with
the |

`fit2` |
second model fit of class bayesmeta, computed with
the |

`parameter` |
parameter for which the the marginal posterior densities should be compared. Possible values are |

`individual` |
integer |

`method` |
method for Hellinger distance computation. Either |

In the random effects model for meta-analysis, the parameter mu is the overall mean parameter, tau is the between-study (heterogeneity) standard deviation, theta_new is the predicted effect for a new study and theta_i is the random effect parameter for study i.

If integral-based computation (`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 (`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`

).

A real number in [0,1].

If the integral-based method is used to compute Hellinger distances (`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 (`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.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
data(aa)
# fit under Jeffreys reference heterogeneity prior
fit1 <- bayesmeta(y = aa[ , "y"], sigma = aa[, "sigma"],
mu.prior.mean = 0, mu.prior.sd = 4,
tau.prior = "Jeffreys")
# fit under standard half-normal heterogeneity prior
fit2 <- bayesmeta(y = aa[ , "y"], sigma = aa[, "sigma"],
mu.prior.mean = 0, mu.prior.sd = 4,
tau.prior = function(t) dhalfnormal(t, scale = 1))
# Hellinger distance between the marginal posteriors for mu
H_fits(fit1, fit2)
# moment-based calculation
H_fits(fit1, fit2, method = "moment")
# Hellinger distance between the marginal posteriors for theta_2
# (random effect parameter)
H_fits(fit1, fit2, parameter = "theta", individual = 2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.