ChibML: Marginal Likelihood by Chib & Jeliazikov's Method for...

Description Usage Arguments Details Value References See Also

Description

The function computes the marginal likelihood, i.e. the posterior normalising constant, with the method of Chib & Jeliazikov (2001) for user-written functions, from which an MCMC posterior sample is available.

Usage

1
ChibML(logfun, theta.star, tune, V, mcmcsamp, df, verbose)

Arguments

logfun

The logarithm of the objective function

theta.star

The starting value of the inner MCMC sampling and the value required by the Chib & Jeliazikov's method. This must be a high denstiy point, such as the posterior mean, median or mode.

tune

The tunning value to be used to achieve the desired efficiency

V

The proposal scale matrix

mcmcsamp

The MCMC sample from the joint posterior

df

The degrees of freedom of the proposal

verbose

A switch which determines whether or not the progress of the sampler is printed to the screen. If verbose is greater than 0 the iteration number, and the Metropolis acceptance rate are sent to the screen every verboseth iteration

Details

The function produce an approximation of the posterior normalizing constant via the Chib & Jeliazikov method in a single block sampling. The proposal distribution for the block is a Student's t-density with df degrees of freedom. The proposal is centered at the current value of theta and has scale matrix H. H is calculated as: H = T*V*T, where T is a the diagonal positive definite matrix formed from the tune.

Value

double, the logarithm of the posterior normalising constant

References

Chib S. & Jeliazikov I. (2001). Marginal likelihood from the Metropolis-Hastings output. Journal of the American Statistical Association, 46, 270–281.

Robert C. P. & Casella G. (2004). Monte Carlo Statistical Methods. 2nd Edition. New York: Springer.

See Also

nlpost_gomp and nlpost_bod2 for examples; MHmcmc, isML


erlisR/iLaplaceExamples documentation built on May 16, 2019, 8:48 a.m.