gaussian.walk: Multivariate normal random walk proposal

Description Usage Arguments Value Author(s) Examples

View source: R/proposals.R

Description

Creates a Gaussian random walk updater function using the given covariance matrix. Assumes state is a vector. NB: This is NOT the updater function itself. The return value is the updater function.

Usage

1

Arguments

sigma

covariance matrix

Value

proposal generator function

Author(s)

Grady Weyenberg

Examples

1
2
3
4
tgt <- function(state)
  -mahalanobis(as.vector(state),colMeans(iris[1:4]),var(iris[1:4]))/2
rprop <- gaussian.walk(diag(4)/20)
iterate(10, metropolis(tgt,rprop), rep(0,4))

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