Description Usage Arguments Details Value Author(s) References Examples
Computing Korobov, generalize Halton and Sobol' quasirandom sequences.
1 2 3 4 
n 
Number n of points to be generated >= 2. 
d 
Dimension d. 
generator 
A 
randomize 
A

method 
A 
seed 
if provided, an integer used within

skip 
number of initial points in the sequence to be skipped
( 
... 
additional arguments passed to 
For sobol()
examples see demo(sobol_examples)
.
In particular, be careful when using
skip > 0
and randomize = TRUE
; in this case, choosing
a wrong seed (or no seed) might lead to a bad sequence.
Note that these procedures call fast C code. The following restrictions apply:
n
,d
must be <= 2^311.
n
must be <= 2^321 and
d
must be <= 360.
if randomize = "none"
or randomize =
"digital.shift"
, n
must be <= 2^311 and
d
must be <= 16510.
The choice of parameters for korobov()
is crucial for the quality of
this quasirandom sequence (only basic sanity checks are
conducted). For more details, see l'Ecuyer and Lemieux (2000).
The generalized Halton sequence uses the scrambling factors of Faure and Lemieux (2009).
korobov()
and ghalton()
return an
(n,d)matrix
; for d=1 an nvector
is returned.
Marius Hofert and Christiane Lemieux
Faure, H., Lemieux, C. (2009). Generalized Halton Sequences in 2008: A Comparative Study. ACMTOMACS 19(4), Article 15.
l'Ecuyer, P., Lemieux, C. (2000). Variance Reduction via Lattice Rules. Stochastic Models and Simulation, 1214–1235.
Lemieux, C., Cieslak, M., Luttmer, K. (2004). RandQMC User's guide. See https://www.math.uwaterloo.ca/~clemieux/randqmc/guide.pdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  n < 1021 # prime
d < 4 # dimension
## Korobov's sequence
generator < 76 # see l'Ecuyer and Lemieux
u < korobov(n, d = d, generator = generator)
pairs(u, gap = 0, pch = ".", labels = as.expression(
sapply(1:d, function(j) bquote(italic(u[.(j)])))))
## Randomized Korobov's sequence
set.seed(271)
u < korobov(n, d = d, generator = generator, randomize = "shift")
pairs(u, gap = 0, pch = ".", labels = as.expression(
sapply(1:d, function(j) bquote(italic(u[.(j)])))))
## Generalized Halton sequence (randomized by definition)
set.seed(271)
u < ghalton(n, d)
pairs(u, gap = 0, pch = ".", labels = as.expression(
sapply(1:d, function(j) bquote(italic(u[.(j)])))))
## For sobol() examples, see demo(sobol_examples)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.