help elabel

Title

elabel -- Extensions to the label commands

Syntax

elabel subcommand
[ elblnamelist ]
[ mappings ]
[ iff eexp ]
[ , options ]

where subcommands are listed below.

elblnamelist is a list of value label names.

Value label names in elblnamelist may contain the wildcard characters
*, ~, and ?; these characters have the same meaning as
they have in varlists.

Names in elblnamelist may refer to value label names indirectly;
(varname) refers to the value label name, if any, that is
attached to varname in the current label language (also
see: extended macro function label). More than one
variable name may be specified; (varlist) evaluates to the
value label names that are attached to the variables in varlist.

Depending on subcommand, an elblname may be preceded by a variable
name and a colon; varname:elblname attaches elblname to
varname (in the current label language) after subcommd has
successfully concluded (also see: generate). Use parentheses to specify
more than one variable name; (varlist):elblname attaches
elblname to the variables in varlist.

mappings are subcommand-specific, typically one of

{#|varname} "label"
[ {#|varname} "label" ... ]

or

(numlist |
=eexp | varlist)
("label" [ ... ] |
=eexp)

where parentheses must be typed. mappings are explained in detail in
the subcommand specific help files. eexp
is explained below.

The iff qualifier is similar to Stata's standard if
qualifier; eexp is explained below.

An eexp is a Stata expression; eexp, however, does
not typically refer to observations in the dataset and does not typically
contain variable names. If eexp contains variable names, they are
interpreted as varname[1], i.e., the value in the first observation.

eexp typically contains the wildcard characters # and
@. The # character acts as a placeholder for (integer)
values, while the @ character represents text, typically in
value labels or variable labels.

Following the iff qualifier, eexp must evaluate to true (!=0) or
false (==0), and it selects a subset of integer to text mappings from value
labels. For example, iff (# < .) selects all non-missing integers and
associated text from a value label. Likewise, iff (@ == "Foreign")
selects only the text "Foreign" and the associated integer value from a value
label. Note that the @ character must not be enclosed in double quotes.

If eexp follows the equals sign in mappings, # is replaced
with the integer values in a value label; likewise, @ is replaced with
the corresponding text. Both wildcard characters may be combined but the
evaluated eexp must either be of type numeric or string.

Description

elabel manipulates variable labels and value labels. For detailed
descriptions of the respective commands, follow the links
below.

Subcommands

elabel variable
Label variables

elabel define
Define and modify value labels

elabel values
Attach value label to variables

elabel dir
List names of value labels

elabel list
List names and contents of value labels

elabel copy
Copy value label

elabel drop
Drop value labels

elabel save
Save value labels in do-file

More subcommands

elabel adjust
Adjust value labels to changed values

elabel compare
Compare value labels

elabel duplicates
Report or remove duplicate value labels

elabel keep
Keep value labels

elabel load
Define value labels from file

elabel modify
Modify value labels

elabel recode
Recode value labels

elabel remove
Remove value labels from variables and memory

elabel rename
Rename value labels

elabel swap
Swap value labels

Programming

elabel programming

Acknowledgments

elabel is strongly inspired by the work of
Nick Cox (labutil),
Ben Jann (labelsof),
Jeroen Weesie
(2005a,
2005b),
and many others; numerous contributions to
Statalist further stimulated
the development of elabel.

References

Weesie, J. 2005a. Value label utilities: labeldup and
labelrename. The Stata Journal, 5(2):154-161.

Weesie, J. 2005b. Multilingual datasets. The Stata Journal, 5(2):162-187.

Author

Daniel Klein

University of Kassel

klein.daniel.81@gmail.com

Also see

Online: label

if installed: labcd, labcopy, labdel,
lablog, labdtch, labmap, labnoeq,
labvarch, labvalch, labmask, labvalclone,
labvalcombine, labelsof,
mlanguage, labeldup, labelrename,
varlabdef, vallabdef