[R] van der Corput sequences

Alberto Monteiro albmont at centroin.com.br
Fri May 23 15:32:37 CEST 2008


In package fOptions, there are functions that generate
Halton sequences. 

The van der Corput sequence for base 2 is a particular case
of the Halton sequence generated by:

n <- 8 # anything here...
x <- runif.halton(n, 1)

In fact, x <- runif.halton(n, dim) will generate the van der Corput
sequences for the base b as the i-th prime number in x[,i].

(in other words, if I want the van der Corput sequence for
base b = 5, I do x <- runif.halton(n, 3) and take x[,3]).

However, it's possible to have van der Corput sequences for
non-prime basis, like (for b = 10):

0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.01, 0.11, 0.21, 0.31, 0.41, 
0.51, 0.61, 0.71, 0.81, 0.91, 0.02, 0.12, 0.22, 0.32, 
 

Is there any R function that generates those sequences?

Alberto Monteiro



More information about the R-help mailing list