{smcl} {* 15jun2005}{...} {cmd:help mata halton()} {hline} {title:Title} {p 4 8 2} {bf: halton() -- Generate a Halton or Hammersley sequence} {title:Syntax} {p 8 8 2} {it:real matrix}{bind:} {cmd:halton(}{it:real scalar n}, {it:d} [, {it:real scalar burn} [, {it:method}]]{cmd:)} {p 8 8 2} {it:void}{bind:} {cmd:_halton(}{it:real matrix x} [, {it:real scalar burn} [, {it:method}]]{cmd:)} {title:Description} {p 4 4 2} This routine generates either a Halton, the default, or a Hammersley sequences of length {it:n} and dimension {it:d}. These sequences have a more uniform scatter over the unit hypercube than sequences generated from pseudo-uniform random numbers. {title:Remarks} {p 4 4 2} {cmd:_halton()} modifies {it:x} and can be used when repeated calls are made to generate long sequences in blocks. {p 4 4 2} The maximum dimension, {it:d}, is 20. {title:Conformability} {cmd:halton(}{it:n}, {it:d}{cmd:):} {it:input:} {it:n}: {it:1 x 1} {it:d}: {it:1 x 1} {it:burn}: {it:1 x 1} {it:method}: {it:1 x 1} {it:output:} {it:result}: {it:n x d} {cmd:_halton(}{it:x}{cmd:):} {it:input:} {it:x}: {it:n x d} {it:burn}: {it:1 x 1} {it:method}: {it:1 x 1} {title:References} {p 4 6 2} Fang, K.T. and Y. Wang (1994) Number-theoretic Methods in Statistics. Chapman & Hall. {title:Source code} {p 4 4 2} {view halton.mata}