Description Usage Arguments Details Author(s)

This function returns a logical TRUE/FALSE value, indicating whether the proposed transition should be accepted (TRUE) or rejected (FALSE).

1 | ```
decide(logMetropolisRatio)
``` |

`logMetropolisRatio` |
The log of the Metropolis-Hastings ratio, which is calculated from model probabilities and forward/reverse transition probabilities. Calculated as the ratio of the model probability under the proposal to that under the current values multiplied by the ratio of the reverse transition probability to the forward transition probability. |

The Metropolis-Hastings accept/reject decisions is made as follows. If `logMetropolisRatio`

is greater than 0, accept (return `TRUE`

). Otherwise draw a uniform random number between 0 and 1 and accept if it is less that `exp(logMetropolisRatio`

. The proposed transition will be rejected (return `FALSE`

). If `logMetropolisRatio`

is NA, NaN, or -Inf, a reject (`FALSE`

) decision will be returned.

Daniel Turek

nimble documentation built on July 29, 2017, 1:01 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.