Dear all,
I have a personal ado that compiles a series of results in a matrice.
So far, my program has 3 otptions.
syntax varlist [if] [in] [aweight fweight] [, g1(varname) g2(varname)
g3(varname)]
and is working fine. Off course, I could keep expanding my options by g4 g5,
etc.
But it would be tiduous.
I want to generalize the options to something like:
prog Myprog
syntax varlist [if] [in] [aweight fweight] [, BYGroup([varlist2])]
tokenize `varlist'
...
while "`1'"~="" {
...
if "`bygroup'" ~="" {
tokenize `varlist2'
....
}
}
So that at the end, my command will just be :
Myprog x1 x2 x3, by(V1 V2 V3 V4 V5 V6)
But it is not working.
How to generalize the options so that I will not limit myself ?
Thanks.
Amadou
*
* 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/