Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: number generation


From   Tyler Frazier <tyfrazier@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: number generation
Date   Sun, 30 May 2010 19:02:20 +0200

I would like to generate a method to number buildings in sequence, but
restart the sequence in accordance with a group.  For example I have
the following nomenclature

(block)  (round)   (plot)     (bldg)
  005       050       010       xxx
  005       050       020       xxx
  005       050       030       xxx
  005       050       040       xxx  ...

  005       050       150       xxx  ...

  005       060       010       xxx  ...

  010       010       010       xxx  ...


where xxx represents a unique object identifier.  I'm thinking to use
gen or egen with a cond() qualifier, but how to set the parameters for
the unique object identifier such that it returns sets of the
following structure

  005      050       010         001
  005      050       010         002
  005      050       010         003  ...

  005      050       010         999

thank you,
Ty
*
*   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/


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