Hello everyone,

Description (taken from STATA help):

multencode creates new numeric variables newvarlist, with value labels defined and attached, based on the string variables strvarlist. The same set of value labels is used for all the new variables. By default a new set of labels will be created with the same name as the first variable in strvarlist. Optionally, a name may be specified using the label() option. In either case, no existing set of value labels with the same name will be used, unless the force option is specified, in which case those value labels will be over-written. In this way, the user is assured that the new variables will have the same alphabetically ordered set of value labels, provided as usual that the request does not breach any limits that apply.


Question:
Is there a command that creates one new variable based on multiple string variables? The definition of such a command may read as follows:

-[command]- creates a new numeric variable newvar, with value labels defined and attached, based on the string variables strvarlist.

I'm assuming code is not required for this discussion, however, I am happy to provide if requested.

Thank you and kind regards,
Kate