random.walk: Gaussian Random-walk proposal kernel

Description Usage Arguments Details Value

Description

A Gaussian random-walk proposal kernel with identity covariance matrix

Usage

1
  random.walk(from, ...)

Arguments

from

State to start from

...

Other arguments passed on to rmvnorm

Details

This is an example of a proposal kernel for the Metropolis-Hastings MH and the Particle-Marginal Metropolis Hastings ParticleMarginalMH algorithms.

All it does is take one random Gaussian step around the current state: random.walk <- function(from, ...) rmvnorm(n=1, mean=from, ...)

The user is invited to write his own proposal kernel based on this simple example. At the very least, it is recommended to tune the covariance matrix used.

Value

New state randomly sampled from a multivariate Gaussian centered on from with, by default, unit covariance matrix


nickpoison/nltsa documentation built on May 23, 2019, 4:48 p.m.