uniform.walk: Uniform jumping proposal functions

Description Usage Arguments Author(s) Examples

Description

I'm not sure about if these should be like gaussian.walk or this. The function from metropolis returns function(state,...), and the ... is passed to the rprop and dprop functions. It allows for this to work, but in practice it seems to make code less self contained and more confusing, since you have to suppply arguments to iterate to control the walker. On the other hand this method means one less intermediate function to construct, and the opportunity to adapt without creating a new proposal function.

Usage

1
  uniform.walk(state, eps = 1)

Arguments

state

current state

eps

maximum magnitude of a jump

Author(s)

Grady Weyenberg

Examples

1
2
3
tgt <- function(state)
  -mahalanobis(as.vector(state),colMeans(iris[1:4]),var(iris[1:4]))/2
iterate(10, metropolis(tgt,uniform.walk), rep(0,4), eps=0.5)

grady/evol-mc documentation built on May 17, 2019, 8:01 a.m.