[R] van der Corput sequences

From: Alberto Monteiro <albmont_at_centroin.com.br>
Date: Fri, 23 May 2008 11:32:37 -0200


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



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 23 May 2008 - 13:35:08 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 23 May 2008 - 14:30:41 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive