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 on April 23, and its replacement, statalist.org is already up and running.


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

st: Re: creating new id variable


From   "Joseph Coveney" <jcoveney@bigplanet.com>
To   <statalist@hsphsun2.harvard.edu>
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index