Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: Re: creating new id variable


From   "Joseph Coveney" <[email protected]>
To   <[email protected]>
Subject   st: Re: creating new id variable
Date   Tue, 28 Aug 2012 11:32:27 +0900

A Muhyidin wrote:

I am trying to make a new id based on the two previous id, but so far
without any luck.
The new id that I'd like to make should be 4 digits, 2 digits from id1
and and 2 digits from id2.
If id2 consists of 1 digit number, I would like to add zero before the
last number to make new_id as 4 digits.
Any help would be appreciated.

--------------------------------------------------------------------------------

Look into the command called "generate".  At the command line in Stata, type:

    help generate

to see more about it.

Earlier today on this list, Statacorp announced an online introductory Stata
course ("NetCourse 101") for people who are unfamiliar with basic syntax and
available commands.

Also, on lists like this on, it usually helps to briefly describe what you've
already tried without any luck.

Joseph Coveney


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index