Description Usage Arguments Details Value References See Also
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.
1 |
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 |
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
.
double, the logarithm of the posterior normalising constant
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.
nlpost_gomp
and nlpost_bod2
for examples; MHmcmc
, isML
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.