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

st: generating number series


From   "Satyarth Kulshrestha" <[email protected]>
To   [email protected]
Subject   st: generating number series
Date   Mon, 14 Oct 2002 10:59:56 -0700

hi,

i need to generate a series of id codes with following protocol:
 6 digit length
1st digit = 1 or 2 [stands for 2 cities from where subjects recruited]
2nd and 3rd digit = house number[ from 01 to 99]
4th digit [= 1 or 2]
5th digit [ 1 to 5]
6th digit[ 1 or 2]

so the series would start from 101111 and end with 299252.

can this be done in STATA? and subsequently can we breakdown this code to
its constituents, eg, analyze by city or anlyze by last 2 digits ie only
thoser case where id ends with 52]?

Thanks,
Satyarth
Satyarth Kulshrestha
MS-Epi IDP, Graduate Research Assistant,
College of Public Health
University of Arizona

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index