I'm using Stata 14 and have a seemingly simple question about order the variables in my list. I have multiple variables that are tagged with numbered stubs at the end. I'd like to order these variables so that they alternate. For instance, if I have the two variables 'districtX' and 'perhundistrictX', where X represents 1, 2, 3, ..., X, I'd like this:
district1
perhundistrict1
district2
perhundistrict2
district3
perhundistrict3
rather than this:
district1
district2
district3
perhundistrict1
perhundistrict2
perhundistrict3
I'm hoping to avoid having to type out all variables by total numbered stubs, N X 59.
Any help is appreciated.
district1
perhundistrict1
district2
perhundistrict2
district3
perhundistrict3
rather than this:
district1
district2
district3
perhundistrict1
perhundistrict2
perhundistrict3
I'm hoping to avoid having to type out all variables by total numbered stubs, N X 59.
Any help is appreciated.
Comment