jags.seed: Set initial value for JAGS RNGs

Description Usage Arguments Details Note Author(s) See Also

View source: R/jags.R

Description

Sets the random seed used by JAGS.

Usage

1
jags.seed(seed)

Arguments

seed

A single integer value.

Details

This function sets the seed for the pseudo-random number generators (RNGs) used by JAGS making subsequent simulations reproducible.

Once the random seed is set by jags.seed, the same seed will be applied to RNG factories in subsequently loaded modules. In practical terms this means that a call to jags.seed may come before or after a call to load.module and will have the same effect.

Note

The JAGS RNGs are independent of the RNGs used by R. A call to the base function set.seed has no effect on the RNGs used by JAGS, and vice versa.

Author(s)

Martyn Plummer

See Also

list.factories to find the names of available RNG factories.


mcmc-jags/rjags documentation built on May 5, 2019, 3:46 a.m.