Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Creating a loop with Halton draws


From   [email protected]
To   <[email protected]>
Subject   st: Creating a loop with Halton draws
Date   Thu, 7 Jun 2007 20:58:41 +0100

Dear statalisters,
I am trying approximate some integrals by simulation.
I use halton the mdraws_ado & mdraws_h_ado to take Halton draws.
Then I need to evaluate a number of times an expression say L=norm(xb)+h1_i
where h1_i is the ith halton draw.
Say that I have 100 draws so I should need to use something like
foreach {
 h1_1-h1_100  
 gen L=norm(xb)+????
How can I specify that this is repeated 100 times and the first time the 1st
halton draw should be used for individual one the 2nd the 2nd halton draw
etc??? Further, can I multiply all halton draws by a constant? Do I need to
construct a matrix with all draws to be able to do that???
Would be most grateful of any help.  
 


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index