Bookmark and Share

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

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

st: Concatenating two numerical variables with labels

From   Tim Evans <>
To   "''" <>
Subject   st: Concatenating two numerical variables with labels
Date   Mon, 6 Feb 2012 12:56:48 +0000


I'm trying to generate a new string variable in Stata 11.2 which contains the concatenated result of two numeric variables which have labels. What I want is the name from the label of each variable rather than 1 1 for instance. I've seen code for concatenating string variables, but don't seem to be able to find this.

I've tried this, but it does not give me a value of the label of two variables:

gen Lab3
replace Lab3 = `"`:label ( site2) '"' + `"`:label (sarc) '"'

Best wishes

This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index