Erica Seiguer
>
> if i have two string variables, is it possible to combine
> them? ie, the
> first var is two digits referring to a state (i.e. 44) and
> the second var is
> 4 digits referring to facility number (i.e. 0010). I want a
> var to look like
> 440010.
Yes. Basically, + means concatenation
with strings (i.e. string variables or more generally
expressions which are or which evaluate to strings)
on either side.
gen strboth = strvar1 + strvar2
gen strboth2 = strvar1 + " " + strvar2
Also check out -egen, concat()-.
Nick
[email protected]
*
* 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/