These functions provide quasi random numbers or space filling or low discrepancy sequences in the \(p\)-dimensional unit cube.
sHalton(n.max, n.min = 1, base = 2, leap = 1)
QUnif (n, min = 0, max = 1, n.min = 1, p, leap = 1)
sHalton(n,m)
returns a numeric vector of length n-m+1
of
values in \([0,1]\).
QUnif(n, min, max, n.min, p=p)
generates n-n.min+1
p-dimensional points in \([min,max]^p\) returning a numeric matrix with p columns.
maximal (sequence) number.
minimal sequence number.
number of \(p\)-dimensional points generated in
QUnif
. By default, n.min = 1, leap = 1
and
the maximal sequence number is n.max = n.min + (n-1)*leap
.
integer \(\ge 2\): The base with respect to which the Halton sequence is built.
lower and upper limits of the univariate intervals.
Must be of length 1 or p
.
dimensionality of space (the unit cube) in which points are generated.
integer indicating (if \(> 1\)) if the series should be
leaped, i.e., only every leap
th entry should be taken.
Martin Maechler
James Gentle (1998) Random Number Generation and Monte Carlo Simulation; sec.\ 6.3. Springer.
Kocis, L. and Whiten, W.J. (1997) Computationsl Investigations of Low-Discrepancy Sequences. ACM Transactions of Mathematical Software 23, 2, 266--294.
32*sHalton(20, base=2)
QUnif(n=10,p=2,leap=409)
Run the code above in your browser using DataLab