Learn R Programming

eggCounts (version 0.4-1)

MHstep: Do a Metropolis-Hastings step

Description

Do a Metropolis-Hastings step

Usage

MHstep(old, rprop, dprop, logUpost, ...)

Arguments

old
current state of the chain
rprop
a random number generating function with arguments n=number of random variables, ... extra-arguments
dprop
the corresponding density function with argument x, and the same ... arguments
logUpost
function evaluating the log unnormalized marginal posterior
...
extra arguments for the proposal density and random number generator

Value

  • new state of the chain with a boolean indicating acceptance as attribute