This function generates (deterministic) points of the Sobol sequence, which is a low-discrepancy sequence that covers the unit cube more evenly than random points.
Arguments
- n
[
integer(1)]
The number of points.- dim
[
integer(1)]
The dimension, at most1111.- start
[
integer(1)]
The number of points to skip at the beginning of the sequence, which allows to generate the sequence in several parts.- shift
[
character(1)|numeric(dim)]
The digital shift, either"none"(default) for the plain Sobol sequence,"fixed"for a shift vector that is always the same (derived from the multiples of the golden ratio),"random"for a shift vector drawn uniformly from the unit cube,or the shift vector itself with values in the unit interval.
References
Joe, S. and Kuo, F. Y. (2008). Constructing Sobol sequences with better two-dimensional projections. SIAM Journal on Scientific Computing 30(5), 2635–2654. doi:10.1137/070709359
See also
Other simulation helpers:
Simulator,
correlated_regressors(),
ddirichlet_cpp(),
dmixnorm_cpp(),
dmvnorm_cpp(),
dtnorm_cpp(),
dwishart_cpp(),
gaussian_tv(),
halton_points(),
lhs_points(),
simulate_markov_chain()
Examples
# first points of the sequence in two dimensions
sobol_points(n = 5, dim = 2)
#> [,1] [,2]
#> [1,] 0.000 0.000
#> [2,] 0.500 0.500
#> [3,] 0.750 0.250
#> [4,] 0.250 0.750
#> [5,] 0.375 0.375
# next points
sobol_points(n = 3, dim = 2, start = 5)
#> [,1] [,2]
#> [1,] 0.875 0.875
#> [2,] 0.625 0.125
#> [3,] 0.125 0.625
# with a digital shift
sobol_points(n = 5, dim = 2, shift = "fixed")
#> [,1] [,2]
#> [1,] 0.618034 0.236068
#> [2,] 0.118034 0.736068
#> [3,] 0.368034 0.486068
#> [4,] 0.868034 0.986068
#> [5,] 0.993034 0.361068
