getJ: getJ

Description Usage Arguments Details Value Author(s) Examples

View source: R/getJ.R

Description

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

Usage

1
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.

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.

Value

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

Author(s)

Trent McDonald

Examples

1
2
getJ(62208, c(2,3))  # should equal c(8,5)
getJ(72, c(2,3))  # should equal c(3,2)

SDraw documentation built on July 8, 2020, 6:23 p.m.