MH_accept_MRW: Calculate the acceptance probability of a Metropolis-Hastings...

Description Usage Arguments Value Examples

View source: R/MH_accept_MRW.R

Description

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.

Usage

1
2
MH_accept_MRW(llh, llh.prime, nu.prior, lambda.prior, param.cur,
  param.prime)

Arguments

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.

Value

Returns the min(1, alpha).

Examples

1
MH_accept_MRW(llh, llh.prime, nu.beta, lambda.beta, beta.cur, beta.prime)

IanniMuliterno/EpidemicR documentation built on Oct. 30, 2019, 7:18 p.m.