Description Format Details Value Fields Methods

This class implements an Adaptive Multi-site logarithmic Metropolis-Hastings random walk algorithm, constrained so the parameter vector sums to 1.

Object of `R6Class`

with methods for updating a DirichletNode instance.

An adaptive multivariate log-Gaussian proposal is used for $d-1$ elements of a $d$-dimensional parameter
vector contained in `node`

, with the $d$th element updated to ensure that the vector sums to 1.
This makes the updater useful for Dirichlet distributed random variables, improving on AdaptiveDirMRW by
ensuring proposals do not go negative.

For details of the adaptive scheme, see Roberts and Rosenthal (2012) Examples of Adaptive MCMC. *Journal of Computational
and Graphical Statistics*. **18**:349–367.

Please note that no checks are performed as to the suitability of this algorithm for a particular StochasticNode. It is up to the user to use the correct update algorithm for the appropriate nodes.

Object of `AdaptiveLogDirMRW`

`cov`

the current covariance

`burnin`

the number of updates to burn in

`tune`

the current tuning matrix

`naccept`

the number of accepted proposals

`ncalls`

the number of times

`update`

has been called`node`

the node to which the updater is attached

`new(node, toupdate = function() 1:length(node$getData()), tune = rep(0.1, length(node$getData())), burning = 100)`

constructor takes an instance of a StochasticNode node, function to choose the indices of the elements to update (by default all elements), initial tuning vector (diagonal of adaptive tuning matrix), and number of calls between adaptations.

`update()`

when called, updates

`node`

`acceptance()`

return the acceptance rate

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.