Description Usage Arguments Value Examples
View source: R/MH_accept_MRW.R
This function calculates alpha, the acceptance probability of a MH step, for a multiplicative random walk, which is where proposals are made on the log scale. It assumes a Gamma prior on the parameter of interest.
1 2 | MH_accept_MRW(llh, llh.prime, nu.prior, lambda.prior, param.cur,
param.prime)
|
llh |
The value of the log-likelihood with the current value of the paramter in question. |
llh.prime |
The value of the log-likelihood with the newly drawn value of the paramter in question. |
nu.prior |
Assuming a Gamma prior on the parameter in question, the value of the parameter nu in that prior. |
lambda.prior |
Assuming a Gamma prior on the parameter in question, the value of the parameter lambda in that prior. |
param.cur |
The current value of the parameter of interest. |
param.prime |
The proposed value of the parameter of interest. |
Returns the min(1, alpha).
1 | MH_accept_MRW(llh, llh.prime, nu.beta, lambda.beta, beta.cur, beta.prime)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.