Learn R Programming

SDraw (version 2.1.13)

getJ: getJ

Description

Compute J, the depth of the Halton lattice, given a population size .

Usage

getJ(N, bases = c(2, 3))

Arguments

N

Population or frame size (a scalar)

bases

A vector of co-prime Halton bases of length D.

Value

A vector of length 2 containing the exponents of bases that produce a Halton cycle of length B such that n <= B <= N.

Details

This routine returns a largest Halton cycle (i.e., B) such that n <= B <= N. The first few Halton cycles are in Robertson et al. (2018) Web table 1.

Examples

Run this code
# NOT RUN {
getJ(62208, c(2,3))  # should equal c(8,5)
getJ(72, c(2,3))  # should equal c(3,2)

# }

Run the code above in your browser using DataLab