HALTON—Generate low-discrepancy sequence

Use this forum to post complete RATS "procedures". Please be sure to include instructions on using the procedure and detailed references where applicable.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

HALTON—Generate low-discrepancy sequence

Unread post by TomDoan »

This procedure generates an n-vector of the Halton sequence for the given base (which should be a prime number). Halton sequences are deterministic "low-discrepancy" sequences which fill the unit cube relatively uniformly (with a different base for each dimension) allowing numerical integrals to be estimated more accurately for a given number of function evaluations than would be possible with truly random numbers.

Halton, J. (1964), "Algorithm 247: Radical-inverse quasi-random point sequence", ACM, p. 701
halton.src
Procedure file
(980 Bytes) Downloaded 905 times
This is an example (from Greene's Econometric Analysis) which uses the procedure to do a "random effects" panel data estimation for a geometric model, which optimization over a function which requires a numerical integral. You can't use standard MC integration to do the integral since each function evaluation would give slightly different results. This particular example probably would be better done with Gauss-Hermite integration since it's a one-dimensional integral over a standard Normal, which can be done with fewer function evaluations using the weighted function values of Gauss-Hermite rather than the flat weights of the Halton sequence.
grnp592.rpf
Example
(2.49 KiB) Downloaded 898 times
rwm.txt
Data file for example
(2.71 MiB) Downloaded 984 times
Post Reply