setRNG (version 2013.9-1)

getRNG: get the RNG and seed from an object

Description

Get the random number generator and seed used to generate an object.

Usage

getRNG(e=NULL)
    # S3 method for default
getRNG(e=NULL)

Arguments

e

an object generated by simulation (which stored the RNG information).

Value

The random seed and other random number generation information used to generate the object.

Details

Extract the RNG information used to generate the object. If e is NULL then getRNG returns the RNG setting, as returned by setRNG(). Otherwise, the default method assumes the object is a list and the RNG information is in the element rng or noise\$rng.

See Also

setRNG, .Random.seed

Examples

Run this code
# NOT RUN {
if (require("dse")) {
  data("eg1.DSE.data.diff", package="dse")
  model <- estVARXls(eg1.DSE.data.diff)
  sim <- simulate(model)
  getRNG(sim)
  }
# }

Run the code above in your browser using DataLab