Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: RE: how to create case id number


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: RE: RE: how to create case id number
Date   Fri, 29 Apr 2005 16:03:53 +0100

No; in general this is _not_ the same 
as _n, even if the argument of -group()- is the 
whole varlist. 

-group()- creates ids according to the sort order 
defined by its argument. Also its result will
match any ties in the data. 

Nick 
n.j.cox@durham.ac.uk 

Jose Valderrama
 
> Other way:
> 
> egen id=group(x1 x2...)
 
Seok-Woo Kwon 
 
> Is there a STATA command that automatically generates a case 
> id for each record in a dataset?
> 

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index