Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: distribs
See also: lowdiscrepancy randomize uniform normal

Quantlet: randomnumbers
Description: computes n p-dimensional independent random vectors

Link:
Usage: y = randomnumbers(seqnum, p, n {, seed1, seed2})
Input:
seqnum scalar, number of the random number generator used seqnum = 0 : ran1 (Numerical Recipies) seqnum = 1 : ran2 (Numerical Recipies) seqnum = 2 : ran3 (Numerical Recipies) seqnum = 3 : generator from G. Marsaglia et al. seqnum = 4 : random number generator of your system seqnum = 5 : generator from ranlib (ACM TOMS) seqnum = 6 : multiply with carry gen. (Marsaglia)
p scalar, the length of the random vectors
n scalar, number of vectors which should be generated
seed1 optional scalar, the first and most important seed for the random generator; valid range is [1,2^31-1]. If not supplied, the current time is used for initialization.
seed2 optional scalar, the second seed (used by generators 5+6 only); valid range is [1,2^31-1] (default value is 1)
Output:
y p x n matrix of the n generated random vectors

Example:
library("distribs")
randomnumbers(6, 4, 5, 234334, 54354354)

Result:
Contents of y

[1,]  0.31862  0.98678     0.75  0.62352  0.27812
[2,]   0.3422  0.31095  0.76461  0.96209  0.56642
[3,]  0.73506  0.83073  0.01885  0.55782  0.19365
[4,]  0.68701  0.025903  0.097506  0.42585   0.7761



Author: J. Schumacher, 20020430 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006