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

st: Re: Preparing for merge


From   "victor michael zammit" <vmz@vol.net.mt>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: Re: Preparing for merge
Date   Thu, 4 Mar 2004 08:29:41 +0100

Dear Statalist, 
the following program generates 256 ,1 by 4 datasets.
Can someone tell me how I could number (in order) these datasets,
such that I could then use merge and bring them in 1,  256 by 4 
dataset ? 
 local a = 1
while `a'<= 4   {
local b = 1
while `b' <= 4 {
local c = 1
while `c' <= 4 {
local d = 1
while `d' <= 4  {
clear
set obs 1
gen a = `a'
gen b = `b'
gen c = `c'
gen d = `d'
save a`a'b`b'c`c'd`d',replace
local d = `d' + 1
}
local c = `c' + 1
}
local b = `b' + 1
}
local a = `a' + 1
}


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