This sounds very ad hoc. Consider instead the possibilities for producing new reduced datasets by -contract- and -collapse-.
Nick
n.j.cox@durham.ac.uk
Jonathan Grondin
I have a questionnaire answered by two groups (group "a" and group "b").
Every question had to be answered by a value of 1 through 10. Every question is then divided into 2 variables, e.g Question 1: "q1a" and "q1b".
I would like to combine q1a and q1b together and create 10 variables out of them each of them holding the frequency of the two groups. e.g. "q1a" and "q1b" would generate: "new_q1_1" to "new_q1_10".
Every new variable would hold two values: new_q1_1 would hold the frequency of people in group "a" who answered "1" and the frequency of people in group "b" who answered "1".
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/