Myprog x1 x2 x3, by(V1 V2 V3 V4 V5 V6) with an indeterminate number
of vars in by() and
where the code reads BYGroup([varlist2]) (I'm not sure what Stata
thinks of that)
But the name of the option that can be worked with is bygroup, not
varlist2:
. program amadou
1. syntax anything, BYgroup(string)
2. di "`anything'"
3. di "`bygroup'"
4. end