Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

QUnif

Quasi Randum Numbers via Halton Sequences


Description

These functions provide quasi random numbers or space filling or low discrepancy sequences in the p-dimensional unit cube.

Usage

sHalton(n.max, n.min = 1, base = 2, leap = 1)
 QUnif (n, min = 0, max = 1, n.min = 1, p, leap = 1)

Arguments

n.max

maximal (sequence) number.

n.min

minimal sequence number.

n

number of p-dimensional points generated in QUnif. By default, n.min = 1, leap = 1 and the maximal sequence number is n.max = n.min + (n-1)*leap.

base

integer >= 2: The base with respect to which the Halton sequence is built.

min, max

lower and upper limits of the univariate intervals. Must be of length 1 or p.

p

dimensionality of space (the unit cube) in which points are generated.

leap

integer indicating (if > 1) if the series should be leaped, i.e., only every leapth entry should be taken.

Value

sHalton(n,m) returns a numeric vector of length n-m+1 of values in [0,1].

QUnif(n, min, max, n.min, p=p) generates n-n.min+1 p-dimensional points in [min,max]^p returning a numeric matrix with p columns.

Note

For leap Kocis and Whiten recommend values of L=31,61,149,409, and particularly the L=409 for dimensions up to 400.

Author(s)

Martin Maechler

References

James Gentle (1998) Random Number Generation and Monte Carlo Simulation; sec.\ 6.3. Springer.

Kocis, L. and Whiten, W.J. (1997) Computationsl Investigations of Low-Discrepancy Sequences. ACM Transactions of Mathematical Software 23, 2, 266–294.

Examples

32*sHalton(20, base=2)
QUnif(n=10,p=2,leap=409)

GLDEX

Fitting Single and Mixture of Generalised Lambda Distributions (RS and FMKL) using Various Methods

v2.0.0.7
GPL (>= 3)
Authors
Steve Su, with contributions from: Diethelm Wuertz, Martin Maechler and Rmetrics core team members for low discrepancy algorithm, Juha Karvanen for L moments codes, Robert King for gld C codes and starship codes, Benjamin Dean for corrections and input in ks.gof code and R core team for histsu function.
Initial release
2020-02-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.