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

Re: st: basic question on generating a string variable


From   cthompson@econometricainc.com
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: basic question on generating a string variable
Date   Wed, 09 Mar 2005 13:26:45 -0500

perhaps the function, concat(varlist), located under -egen-??
type -findit egen- for more information...
cheers, clint

On 9 Mar 2005 at 13:20, J Bravo wrote:

> dear all,
> 
> i have a data-set with unit- and year- string identifiers -
> respectively, clave2str and year2str.
> 
> say that i want to create a new year-unit identifier, say clavestr, so
> that the first two characters of clavestr give me the year (from
> year2str) and the next 5 characters give me the unit (from clave2str)
> 
>      | clave2str   year2str |	clavestr
>      |------------------|
> 100. |     1005       97 |	971005
> 101. |     1005       98 |	981005
> 102. |     1005       99 |	991005
> 103. |     1006       80 |	801006
> 104. |     1006       83 |	831006
>      |------------------|
> 105. |     1006       86 |	861006
> 106. |     1006       89 |	891006
> 
> 
> any advice?
> 
> thanks many.
> 
> jb
> 
> *
> *   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/




Clinton J. Thompson
Econometrica, Inc.
4416 East-West Highway, Suite 215
Bethesda, MD  20814
Phone: 240-333-4803
Fax: 301-657-3140
www.EconometricaInc.com

The information transmitted is intended only for the person 
or entity to which it is addressed and may contain confidential 
and/or privileged material. Any review, re-transmission, 
dissemination or other use of, or taking of any action 
in reliance upon, this information by persons or entities 
other than the intended recipient is prohibited. If you
received this in error, please contact the sender and 
delete the material from any computer.

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