Title
labvalcl -- Clear value labels of null strings
Syntax
labvalcl [lblname-list] [, null[("label")] numeric nodetach]
Description
labvalcl removes null strings from value labels and detaches empty value labels from variables. Empty value labels are dropped from memory. If lblname-list is not specified it defaults to all value labels in memory.
Options
null[("label")] additionally removes label from value labels in lblname-list. If label is not specified it defaults to "null".
numeric additinally removes (integer) numbers from value labels if integers are used as labels for the integer values they are associated with. Thus "2" will be removed if it is associated with value 2.
nodetach does not detach empty value labels from variables. This option is seldom used.
Example
Setting
. sysuse nlsw88 . label define racelbl 4 "" ,modify . label define marlbl 0 "0" 1 "" ,modify . describe race married . label list racelbl marlbl
Remove null strings, numeric to numeric mappings and detach and drop empty value labels
. labvalcl racelbl marlbl ,numeric . describe race married . label list racelbl . label list marlbl
Author
Daniel Klein, University of Bamberg, klein.daniel.81@gmail.com
Also see
Online: label, labelbook_problems
if installed: labdel, labdtch, labvalch, labeldup, strrec, labutil2