Data Management and Analysis: Random Number Generation

State of the Art Random Number Generator

LIMDEP uses the Mersenne Twister random number generator. This generator has a period of roughly 210000 draws. This is large enough to avoid recycling in any conceivable Monte Carlo study.

  • Set seed for the generator: random samples can be replicated.
  • Continuous random variables: uniform, normal, truncated normal, lognormal, t, chi-squared, F, exponential, Weibull, Gumbel, gamma, beta, logistic, Cauchy
  • Discrete random variables: Poisson, discrete uniform, binomial, geometric

Randomness Tests

The random number generators in LIMDEP and three other programs were subjected to the ‘DIEHARD’ battery of 15 tests of randomness in McCullough’s (Journal of Applied Econometrics, 1999) study. LIMDEP’s generator passed all but one. Only one of the four programs passed all tests and the other two failed most of them.

Halton Sequences

This is a new method of computing simulation based integrals through use of nonrandom sequences. LIMDEP uses these in several places, and provides a function so users can create them for their own estimators.