modelUpdate {BRugs}R Documentation

Updating the model

Description

This function updates the model.

Usage

modelUpdate(numUpdates, thin = 1, overRelax = FALSE)

Arguments

numUpdates

This function updates the model by carrying out thin * numUpdates MCMC iterations for each chain.

thin

The samples from every kth iteration will be used for inference, where k is the value of thin. Setting thin > 1 can help to reduce the autocorrelation in the sample, but there is no real advantage in thinning except to reduce storage requirements.

overRelax

If overRelax is TRUE an over-relaxed form of MCMC (Neal, 1998) which will be executed where possible. This generates multiple samples at each iteration and then selects one that is negatively correlated with the current value. The time per iteration will be increased, but the within-chain correlations should be reduced and hence fewer iterations may be necessary. However, this method is not always effective and should be used with caution. The auto-correlation function may be used to check whether the mixing of the chain is improved.

Note

This function can be executed once the model has been compiled and initialized.

If an attempt is made to execute this function in an inappropriate context the generic error message ‘command is not allowed (greyed out)’ is displayed.

References

Neal, R. (1998): Suppressing random walks in Markov chain Monte Carlo using ordered over-relaxation. In M.I. Jordan (Ed.): Learning in Graphical Models, Kluwer Academic Publishers, Dordrecht, 205-230. https://glizen.com/radfordneal/publications.html

See Also

BRugs, help.WinBUGS


[Package BRugs version 0.9-2.1 Index]