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

Re: st: Combining values


From   Frank Eaton <FEaton@NFOCFgroup.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Combining values
Date   Thu, 13 Feb 2003 15:54:27 -0800

This should work:

genrate newvar=age1*100+age2

At 02:38 PM 2003-02-13 -0600, you wrote:
>Hello Stata listers. I was looking in the Faq and did not find any topic
>related with my question. I think is very simple. I need to combine the
>values provided in two variables to make a new variable. For example:
>age1=4
>age2=99
>
>New variable=499 where the first number represents a code and the second the
>age recorded depending of the first code.
>
>Thanks for your precious time!
>
>Regards
>
>Rodrigo
>
>
>
>*
>*   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/
>
>

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