sample_metropolis_hastings {rmcmc} | R Documentation |
Sample from Metropolis-Hastings kernel.
Description
Sample from Metropolis-Hastings kernel.
Usage
sample_metropolis_hastings(
state,
target_distribution,
proposal,
sample_uniform = stats::runif
)
Arguments
state |
Current chain state. |
target_distribution |
Target stationary distribution for chain. A list
with named entries |
proposal |
Proposal distribution object. Must define entries |
sample_uniform |
Function which generates a random vector from standard uniform distribution given an integer size. |
Value
List with named entries
-
state
: corresponding to new chain state, -
proposed_state
: corresponding to proposed chain state, -
statistics
: a list with named entries for statistics of transition, here this consisting of a named entryaccept_prob
for the Metropolis acceptance probability.