Description Usage Arguments Details Value Author(s) References See Also Examples
Using the L'Ecuyer-CMRG random generator provided by the R package parallel, this follows the strategy outlined in L'Ecuyer, et. al (2002). The very very long random stream is subdivided into smaller streams, thus allowing the creation of several separate streams of random numbers for each of the runs of a simulation exercise.
1 | seedCreator(nReps = 2000, streamsPerRep = 3, seed, file = NULL)
|
nReps |
Number of replications for which starting seed values are to be created. |
streamsPerRep |
Number of streams to be created for each separate simulation. |
seed |
An integer seed value that can be used to initialize the creation of the many-separate-substreams. |
file |
The file name in which the list of stream seeds is to be collected, by default, that file is called "projSeeds.rds". |
This makes it possible to execute a batch of simulations, and then later re-start any particular run of interest. This works whether the calculations are done in parallel on a cluster or serial on a single computer. This function takes into account the possibility that, within each run of the model, it may be necessary to draw values from several separate streams of random numbers (for example, to keep separate streams for the generation of data about teachers, students, school buildings, and so forth). This function creates the seeds, allowing for accurate replication on a diverse network of computing devices. It generates the seeds of many separate streams and returns them in an object (and also writes them in a file). The seeds to re-start a simulation are kept in a list object.
The user specifies the number of simulation runs, "nReps," so the output list will have "nReps" elements. In each of those objects inside the list, there will be seeds to initialize "streamsPerRep" streams.
A list that includes "nReps" elements. Each element is a vector of "streamsPerRep" stream starting values.
Paul E. Johnson pauljohn@ku.edu
L'Ecuyer, P. (1999). Good Parameters and Implementations for Combined Multiple Recursive Random Number Generators. Operations Research, 47(1), 159-164. L'Ecuyer, P., Simard, R., Chen, E. J., & Kelton, W. D. (2002). An Object-Oriented Random-Number Package with Many Long Streams and Substreams. Operations Research, 50(6), 1073-1075.
snowft, streams, parallel
1 2 3 4 5 6 7 8 9 10 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.