gen id=_n
* assigns the input line number to the observation
On Wed, Apr 29, 2009 at 12:33 PM, Nick Cox <[email protected]> wrote:
> Use -egen, group() label- or -egen, concat()-. Also study
>
> FAQ . . . . . . . . . . . . . . . . . . . . . . Creating group identifiers
> 3/01 How do I create individual identifiers numbered
> from 1 upwards?
> http://www.stata.com/support/faqs/data/group.html
>
> Nick
> [email protected]
>
> SERGIO M. AFCHA CHÁVEZ
>
> I have a little problem merging a data base. I have variables for 3
> years showing an ID:
>
>
> V1 V2 V3
> 1 . 1
> 2 . 2
> 3 3 3
> 4 4 .
> . 5 5
> 6 . 6
>
>
> I need only one ID variable. How can I obtain one column with all the
> ID numbers?
>
> *
> * 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/
>
*
* 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/