Learn R Programming

rjags (version 4-16)

update: Update jags models

Description

Update the Markov chain associated with the model.

Usage

# S3 method for jags
update(object, n.iter=1, by, progress.bar, ...)

Value

The update method for jags model objects modifies the original object and returns NULL.

Arguments

object

a jags model object

n.iter

number of iterations of the Markov chain to run

by

refresh frequency for progress bar. See Details

progress.bar

type of progress bar. Possible values are "text", "gui", and "none". See Details.

...

additional arguments to the update method (ignored)

Author

Martyn Plummer

Details

Since MCMC calculations are typically long, a progress bar is displayed during the call to update. The type of progress bar is determined by the progress.bar argument. Type "text" is displayed on the R console. Type "gui" is a graphical progress bar in a new window. The progress bar is suppressed if progress.bar is "none" or NULL, if the update is less than 100 iterations, or if R is not running interactively.

The default progress bar type is taken from the option jags.pb.

The progress bar is refreshed every by iterations. The update can only be interrupted when the progress bar is refreshed. Therefore it is advisable not to set by to a very large value. By default by is either n.iter/50 or 100, whichever is smaller.