help elabel compare

Title

elabel compare -- Compare value labels

Syntax

elabel compare
lblname1
lblname2
[ iff eexp ]
[ , assertidentical ]

Description

elabel compare compares two sets of value labels.

Options

assertidentical verifies that lblname1 and lblname2
define the same integer-to-text mappings and exits with the respective
error message if they do not. If assertidentical is specified, only
r(name#) and r(identical) are returned in r().

Examples

Load example data

. sysuse nlsw88

. describe

Modify two value labels and compare them

. elabel define marlbl gradlbl .a "N/A" , add

. elabel compare marlbl gradlbl

Copy a value label and verify the result

. elabel copy marlbl marlbl2

. elabel compare marlbl marlbl2

Saved results

elabel compare saves the following in r():

Scalars

r(min#) minimum nonmissing value
in lblname#

r(max#) maximum nonmissing value
in lblname#

r(nemiss#) number of extended
missing values in lblname#

r(k#) number of mapped values
in lblname#

r(k) number of mapped values
common to both lblname1 and lblname2

r(identical) whether value labels are
identical

Macros

r(name#) lblname#

r(values#) integer values
in lblname#

r(labels#) text associated
with integer values in lblname#

r(values) integer values
common to both lblname1 and lblname2

r(labels) text associated with integer
values common to both lblname1 and lblname2

Author

Daniel Klein

University of Kassel

klein.daniel.81@gmail.com

Also see

Online: label

if installed: elabel, labeldup