help labellist

Title

labellist -- List value labels

Syntax

labellist [varlist] [, listonly returnall]

Description

labellist lists contents of value labels attached to variables in
varlist. Value label names, values and corresponding labels are
displayed and returned in r(). If varlist is not specified,
it defaults to _all. Any variable in varlist that does not
have a value label attached is ignored.

Options

Options

listonly does not return the contents of value labels. If
varname has value label lblname assigned, specifying
listonly executes: label list lblname

returnall returns the value label names, values and labels for
each variable in varlist in
r(varname_labels/values/lblname).

Example

. sysuse nlsw88 ,clear
(NLSW, 1988 extract)

. labellist occupation
occlbl:
1 Professional/technical
2 Managers/admin
3 Sales
4 Clerical/unskilled
5 Craftsmen
6 Operatives
7 Transport
8 Laborers
9 Farmers
10 Farm laborers
11 Service
12 Household workers
13 Other

Saved results

labellist saves the following in r():

Scalars

r([varname_]labels)	labels
r([varname_]values)	values
r([varname_]lblname)	value label name

Acknowledgments

The idea and concept is borrowed from Ben Jann's labelsof. Both
programs return the same information.

The approach taken is inspired by Austin Nichols, who also encouraged
me to make myself familiar with Mata.

The name labellist is borrowed from Stata's official
label list, as is the output.

Author

Daniel Klein, University of Bamberg, klein.daniel.81@gmail.com

Also see

Online: label

if installed: labelsof