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/