am_sd: Adaptive Metropolis algorithm (scaling factor)

Description Usage Arguments Value Author(s) References

View source: R/am_sd.R

Description

Adaptive Metropolis algorithm (scaling factor)

Usage

1
am_sd(prior, pdf, t, d)

Arguments

prior

A function(N,d) that draws N samples from a d-variate prior distribution. Returns an N-by-d matrix.

pdf

A function(prior) that calculates the density of the target distribution for given prior. Returns an N-variate vector.

t

numeric. Number of samples from the Markov chain.

d

numeric. Number of parameters.

Value

list with named elements 'chain': a t-by-d matrix of parameter realisations for each iteration of the Markov chain; and 'density': a t-variate vector of densities computed by pdf at each iteration of the Markov chain.

Author(s)

Tobias Pilz tpilz@uni-potsdam.de

References

Code from 'Algorithm 3' of (note error in line before the last therein):

Vrugt, J. A.: "Markov chain Monte Carlo simulation using the DREAM software package: Theory, concepts, and MATLAB implementation." Environmental Modelling & Software, 2016, 75, 273 – 316, http://dx.doi.org/10.1016/j.envsoft.2015.08.013.


tpilz/HydroBayes documentation built on May 6, 2019, 3:44 p.m.