Description Usage Arguments Value Author(s) Examples
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.
1 |
sigma |
covariance matrix |
proposal generator function
Grady Weyenberg
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.