Learn R Programming

SDraw (version 2.1.13)

halton.coefficients: halton.coefficients

Description

Return the coefficients in the Halton equation for a list of Halton indices (boxes).

Usage

halton.coefficients(samp, J, bases = c(2, 3))

Arguments

samp

A vector of Halton indices.

J

A vector of powers of the bases. This determines the level of hierarchy in the Halton boxes and the number of boxes.

bases

The bases of the Halton sequence.

Value

An array of size length(samp) X max(J) X length(J) of coefficients. Row i, column j, page k of this array is the jth coefficient for the kth dimension of the ith index in samp.

Details

Let digits = halton.coefficients(samp,J,bases), K = max(J) and places <- 1/matrix(rep(bases,each=K)^(1:K),K,length(J)). The coordinate in [0,1) of the lower left corner of the Halton box with index samp[i] is colSums(digits[i,,] * places, na.rm = T). This is how you get the Halton sequence from this routine. However, if you are interested in the Halton sequence alone, not the coefficients, call function halton().