Statalist


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

st: Replace a loop with the help of simulate?


From   Johannes Eggs <[email protected]>
To   [email protected]
Subject   st: Replace a loop with the help of simulate?
Date   Tue, 02 Oct 2007 14:44:31 +0200

Hi,
is there a possibility to replace the following loops with the help of
the simulate or some other command. The loops are working, but I would
like to have one dataset not a 100.

local i = 100

while `i' > 0 {
set seed `i'
use data.dta
bsample
xtmixed y x1-Xn || L:
predict b, rstandard
collapse b z, by(L)
save no`i'.dta
   local i= `i' -1
   }

local i = 100
while `i' > 1{

append using no`i'.dta
   local i= `i' -1
   }

Thanks in Advance
J.Eggs


*
*   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