Description Usage Arguments Value Examples
Helper function for MCMC-based samplers.Calculates a proposed move from the current position and decides whether the chain should move there based on a Metropolis-Hastings acceptance rule.
1 | metropolis_step(current_x, pdf, proposal_f, beta = 1)
|
current_x |
vector. Current position of the chain |
pdf |
Probability density function of the target distribution |
proposal_f |
Function from which to draw proposals, given a mean |
beta |
Temperature of the chain. Acceptance of the proposed state becomes more likely as beta approaches 0. |
List with the position for the next step of the chain and a boolean representing whether the proposal has been accepted or not
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.