help labmvs
-------------------------------------------------------------------------------

Title

labmvs -- Change numeric values associated with value labels to extended missing values

Syntax

labmvs [varlist] [if] [in] , mv("label" ["label" ...]) [ options ]

Description

labmvs changes numeric values associated with labels to extended missing values. Numeric values are changed to successive extended missing value codes, starting with .a. Thus, the numeric value associated with the first label specified, will be coded .a, the value associated with the second label, .b and so on. Value labels are modified accordingly.

Up to 26 labels may be specified in mv(). Enclose label in double quotes if it contains embedded spaces. If varlist is not specified it defaults to _all.

Although it is not recommended, the wild cards * and ? may be used in label, where the fromer means 0 or more characters, the latter exactly one character. Specifying wild cards is discouraged, as it might result in multiple numeric values changed to only one missing value code, with the value label of the last numeric value attached. This will not be reversible.

Reminder: modifiactions in value labels affect all variables that have the same value label as one of the variables in namelist attached.

Remarks

As of version 1.0.1 of the program, labmvs is compatiple with Stata 9.2 (or higher). The code for labmvs9 will not be removed from the package, but I recommend using labmvs instead.

Options

mv(labels) specifies text in value labels indicating numeric values to be changed to extended missing value codes. This is a required option.

allvars changes numeric values to extended missing values in all variables that have the same value label as one of the variables in varlist attached.

casesensitive performs a case sensitive search for labels in value labels.

nodelete prevents labmvs from deleting value labels that are changed. If specified, numeric missing values and extended missing value codes will be associated with the same text.

fmvc(mvc) specifies the first extended missing value code to be used. Default is .a. Note that the maximum number of labels allowed in mv() will be reduced if mvc > .a

Example

. sysuse nlsw88 . tabulate race . label list racelbl

. labmvs race ,mv(other) . tabulate race . tabulate race ,missing . label list racelbl

Decode missing values . labmvs occ ,mv("Transport" "Sales")

Encode missing values using labmv . labmv `r(varlist)' ,mv(`r(occupation)') encode

Saved results

labmvs saves the following in r():

Macros r(minmvc) minimum extended missing value code (if specified) r(varlist) varlist (only variables that are changed) r(lblnamelist) value labels r(varname) numeric values in varname that are changed

Author

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

Also see

Online: mvdecode, label

if installed: labelmiss, labutil2