Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: help to create a new identifier variable based on value


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: help to create a new identifier variable based on value
Date   Tue, 7 Feb 2006 17:54:05 -0500

assuming the sort order you want matches the text of your request:
. bys Customer PkgNo occurrence: gen ID=PkgNo[1]
see -help bysort- for more.

On 2/7/06, [email protected] <[email protected]> wrote:
> Hello All,
>
> I have a dataset like the following and need to create a new variable
> (identifier) based on the value of the occurrence. The data set is by
> pkgNo and customer.

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