Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: halton sequence


From   Daniel Feenberg <feenberg@nber.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: halton sequence
Date   Fri, 6 Aug 2004 15:25:06 -0400 (EDT)

I have actually co-authored a paper using Halton sequences, but we used
Gauss to generate them (I didn't know any Stata at the time). The full
source for our generator is in Appendix B of the paper (
http://www.nber.org/papers/w4147 ), and looking at it I don't see why it
couldn't be done in Stata. However my Gauss is now weak, and I may
not be understanding my own code. 

Halton's paper describes the sequences in a number-theoretic way which
looks like something only a LISP interpreter could do, but there is an
alternative floating point generater that Halton also describes (and which
is referenced in our paper). We coded it in about a dozen lines of Gauss.
If you are trying to do LISP in Stata, that would be a problem.

We did find much faster convergence with Halton sequences. I hope you will
give them a try.

Daniel Feenberg

On Fri, 6 Aug 2004, Alfonso Miranda Caso Luengo wrote:

> Dear all,
> 
> Let me expand a little on my last e-mail. In the last few years Maximum Simulated likelihood has been proposed as a good alternative for estimating models where various random effects are present so that maximum likelihood estimation requires multivariate integration. Though Gauss-Hermite integration is possible with, say, four or less random effects, integration by simulation seems to be a promising alternative. Integration by simulation can be based on random draws from a uniform. However, it has been suggested in the literature that using Halton draws (which are systematic and cover better the 0-1 interval) is better. For these reasons I would like to use Halton draws to write a simulated maximum likelihood routine.
> 
> I have found however that this is not an easy task in Stata, as most Halton generators currently available are written in low level language on the basis of programming facilities that we do not have in Stata. I am sure there is a Stata way to do it, I just cannot imagine an efficient way (all my ideas crash with the length limits of macros and matrices in Stata). 
> 
> Can you contribute some ideas?
> 
> Does Stata Corp. has something to say on this regard?   
> 
> Many thanks,
> 
> Alfonso.
> 
> 
> 
> 
> =====================================
> Alfonso Miranda
> PhD Student
> 
> Economics Department
> University of Warwick
> Coventry CV4 7AL
> E-mail:ecrgw@warwick.ac.uk
> WebPage: http://www.warwick.ac.uk/go/amiranda
> =====================================
> >>> Alfonso.Miranda-Caso-Luengo@warwick.ac.uk 08/06/04 17:20 PM >>>
> Dear all,
> 
> Is there any way (i.e., code) of obtaining Halton draws in Stata? Could you point me to the right direction?
> 
> Best,
> 
> Alfonso.
> 
> 
> =====================================
> Alfonso Miranda
> PhD Student
> 
> Economics Department
> University of Warwick
> Coventry CV4 7AL
> E-mail:ecrgw@warwick.ac.uk
> WebPage: http://www.warwick.ac.uk/go/amiranda
> =====================================
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index