Alternatively, you can use -joinby-:
save the list of i's and j's as
keep i
save ilist
then create the list of k's:
clear
set obs 17
g byte k = _n
joinby ilist
rename i j
joinby ilist
Privet Marilandu, ya k vam podavat'sa na job market budu :)
> > I have 3 numlists i=1-99 j=1-99 and k=1-17. i and j are actually the
> > same but numbers go 1,2,4,7...99 (total of 79 elements). k goes exactly
> > from 1 to 17.
> > I want to construct dataset of three variables i, j, and k that will
> > have all possible combinations ie
> > i j k
> > 1 1 1
> > 1 1 2
> > ........
> >
> > 99 99 17
> >
> > Are there any tools to do this?
--
Stas Kolenikov
http://stas.kolenikov.name
*
* 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/