sample_metropolis_hastings | R Documentation |
Sample from Metropolis-Hastings kernel.
sample_metropolis_hastings(
state,
target_distribution,
proposal,
sample_uniform = stats::runif
)
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. |
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 entry accept_prob
for the Metropolis
acceptance probability.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.