game: Gaussian Mixture Importance (GAME) sampling

Description Usage Arguments Details Value Note Author(s) References

View source: R/game.R

Description

Implementation of the GAME algorithm for sampling of the marginal likelihood, also called model evidence, for use in Bayesian model comparison and/or averaging frameworks.

Usage

1
2
3
4
game(theta, theta_post, m_sub = NULL, m0 = NULL, m1, Jmax = 5, ic, omega,
  ob = FALSE, R = NULL, par.info = NULL, lik = NULL, fun = NULL, ...,
  obs = NULL, abc_rho = NULL, abc_e = NULL, glue_shape = NULL,
  lik_fun = NULL, ncores = 1)

Arguments

theta

numeric. An m-by-d matrix of posterior samples (e.g. generated by dream_parallel).

theta_post

numeric. An m-dimensional vector of posterior densities for theta (e.g. generated by dream_parallel).

m_sub

integer. The number of sub-samples from m in theta and theta_post to be drawn to speed-up estimation of the Gaussian mixture distribution. This sub-sample of m will be excluded when drawing the m1 samples. Must be <= nrow(theta)-m1. Default: NULL (all m samples are used).

m0

integer. Number of samples to be drawn from the mixture distribution on wich the target function will be evaluated (an algorithmic parameter; only needed if omega > 0; also defines the number of times, fun needs to be evaluated and, thus, influences the computing time, but also the sampling accuracy).

m1

integer. Number of sub-samples to be drawn from theta to sample the model evidence. As such, it needs to be <= nrow(theta).

Jmax

integer. Maximum number of components to be used for the Gaussian mixture distribution which is used as catalyst to sample the model evidence. Volpi et al. (2017) suggest a value of 5 (default).

ic

character string defining the Information Criterion to be used to evaluate the calibration of the Gaussian mixture distribution. One of: 'bic' - Bayesian Information Criterion; 'var' - variance of the ratio between the density of the target distribution and the density of its approximation (the Gaussian mixture distribution).

omega

numeric. Parameter defining the sampling procedure to be applied: 0: reciprocal importance sampling (RIS); 0 < omega < 1: bridge sampling with geometric bridge (GB); 1: importance sampling (IS). Nedds to be within [0,1].

ob

logical. If TRUE, bridge sampling with optimal bridge using an initial value from GB or IS (depending on omega) will be applied. Default: FALSE. If omega == 0, it will be ignored.

R

integer. Number of iterations within bridge sampling with optimal bridge. If ob == TRUE and is.null(R) (default), it will be set to a value of 10 (suggested by Volpi et al., 2017). If ob == FALSE, it will be ignored.

par.info

list. See dream_parallel.

lik

integer. See dream_parallel.

fun

character. See dream_parallel.

...

Additional arguments to fun, see dream_parallel.

obs

numeric. See dream_parallel.

abc_rho

character. See dream_parallel.

abc_e

numeric. See dream_parallel.

glue_shape

numeric. See dream_parallel.

lik_fun

character. See dream_parallel.

ncores

integer. See dream_parallel.

Details

Notation:

- m: Number of MC samples.
- d: number of parameters.

Value

A named list with the following elements:

Z: Single value of the calculated marginal likelihood / Bayesian model evidence.

J: Number of components of the best calibrated Gaussian mixture distribution (<= Jmax).

ic_val: Value of the selected Information Criterion of the best Gaussian mixture distribution.

Note

The arguments specific to function dream_parallel are only needed if omega > 0, i.e. if additional evaluations of the target function (fun) are necessary. Therefore, RIS might be most CPU efficient (especially if an evaluation of fun requires a lot of computation time), but could be inappropriate in sampling the model evidence!

Author(s)

Tobias Pilz tpilz@uni-potsdam.de

References

Volpi, E., G. Schoups, G. Firmani and J. A. Vrugt: "Sworn testimony of the model evidence: Gaussian Mixture Importance (GAME) sampling". Water Resources Research, 2017, 53, http://dx.doi.org/10.1002/2016WR020167.


tpilz/HydroBayes documentation built on May 6, 2019, 3:44 p.m.