I have a data that looks like this:
_obs_ _x_ _y_
1 1 0
2 1 0
3 0 1
4 0 1
5 1 0
6 0 1
7 0 1
I want to generate a 'streak' variable that will make the data look like
this:
_obs_ _x_ _y_ _z_ _z2_
1 1 0 1 0
2 1 0 2 0
3 0 1 0 1
4 0 1 0 2
5 1 0 1 0
6 0 1 0 1
7 0 1 0 2
Does anyone have a suggestion?
Thanks
Rich
-------------------
Richard Prisinzano
Graduate Student
Department of Economics
University of Texas
prisinz@eco.utexas.edu
http://www.eco.utexas.edu/graduate/Prisinzano/
*
* 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/