metropolis: Create a metropolis hastings updater function.

Description Usage Arguments Value Author(s)

View source: R/metropolis.R

Description

This function creates and returns a function which implements a Metropolis-Hastings updater.

Usage

1
  metropolis(target, rprop, dprop = NULL)

Arguments

target

target distribution function. Function should accept current (population of) state(s) as its first parameter and return a vector containing the density evaluation(s).

rprop

either a function, or a list of functions. Proposal generator functio(n).

dprop

either a function, a list of functions or NULL. Proposal density function(s), NULL value means the proposal density is symmetric.

Value

a function which implements the Metropolis-Hasting updater.

Author(s)

Grady Weyenberg


grady/evol-mc documentation built on May 14, 2017, 2:05 p.m.