*! version 2.6 18 July 2016
help for nepsmissversion 2.6 (18 July 2016)

Title

nepsmiss -- Create Stata extended missing codes from NEPS missing codes

Table of contents

Syntax
Description
Options
Remarks
Examples
Authors
Saved results
Also see

Syntax

nepsmiss varlist [, options]

Main
reverse revert previously encoded extended missing values to original

Advanced
keeplabels do not change value labels

misslist(numlist) use self-defined list of missing values instead of NEPS missing values

legacydefault use legacy default NEPS missing values

verbose give verbose output

Description

nepsmiss transforms numerical missing values as provided by NEPS Scientific Use Files to Stata extended missing values (e.g. -97 to .c) and vice versa (with the reverse option).
In contrast to Stata's mvencode and mvdecode, it will preserve the value labels associated, thus the resulting extended missing values are labeled accordingly.
For the NEPS Scientific Use Files being multilingually labeled, nepsmiss takes care of multilingual value labels.

Both the original values, the assigned extended missing values and the value labels detected by nepsmiss are saved as characteristics attached to the variable,
and re-interpreted when reverting to the original values with the reverse option. Thus, the reverse procedure is only possible when the encoding
has been done with nepsmiss. However, the attached information will be saved with the dataset and can be used in later sessions with the dataset.

Note that nepsmiss does not generate new variables but rather overwrites the value labels and variables directly, so be careful when saving your dataset.

nepsmiss is quite similar to Daniel Klein's labmv (which actually was developed at the same time), but comes with NEPS missing codes as default value list.
Acknowledgements go to Daniel Klein for reviewing the nepsmiss code and giving hints for optimization.

Options

Main

reverse if specified, nepsmiss will search for previously saved characteristics and revert the procedure.

Note that this will only work when extended missing values have been encoded with nepsmiss in normal mode, otherwise it drop an error message and exit.

Advanced

keeplabels if specified, value labels will not be changed; only values will be recoded.

misslist(numlist) if given, nepsmiss will process the specified numlist instead of NEPS' default missing values. If ommitted,
it defaults to -99/-92 -90 -56/-51 -29/-20, covering all possible missing values in NEPS Scientific Use Files.

Note that this option makes nepsmiss quite versatile and applicable to nearly every dataset using numeric missing values, although
we will only provide support when using it with NEPS Scientific Use Files.

legacydefault if specified, nepsmiss will use a legacy, deprecated default list of missing values: -99/-92 -90 -56/-51 -25/-20 -9/-5 (as opposed to the default list above).

This makes nepsmiss behave in the same way as older versions (prior to version 2.6, before 18 July 2016). It should only be needed when using nepsmiss on very old NEPS Scientific Use Files,
which probably should be avoided anyways.

verbose drops verbose output during the process. Possibly needed for debugging your syntax.

Remarks

This command is part of the NEPStools bundle, written to assist with the NEPS dataset files.

The source code of the program is licensed under the GNU General Public License version 3 or later. The corresponding license text can be found on the internet at http://www.gnu.org/licenses/ or in gnugpl.

Two non-critical warning messages may be dropped by nepsmiss.

One is self-explanatory:

Warning: value label name is also attached to variables varlist;

these surplus variables will not be recoded!

Consider running nepsmiss on those variables as well to correctly recode them!

This means: Other variables also use the value label container name, and they should also be treated with nepsmiss, for the name has been modified.

The second warning might be harder:

...detected value value in variable varname, but it has no entry in value label name; this might be a metadata or data error!

This means: You nepsmissed variable varname (at least). While scanning the variable for missing values, nepsmiss
encountered observations holding the value value. However, this value is not labeled in value label container name.
This could be an error in your dataset, or in your data's metadata. To keep things short: You have to decide what to do. You have (at least) one value without value label.
You can live with it, or you can investigate the source of the problem. It may originate from a merge operation and therefore be harmless.

Examples

Encode NEPS missing values to extended missing values in variables mpg and weight:

. nepsmiss mpg weight

Encode NEPS missing values to extended missing values in all variables:

. nepsmiss _all

Decode extended missing values to NEPS missing values in variable foreign:

. nepsmiss foreign, reverse

Authors

Daniel Bela (daniel.bela@lifbi.de), Leibniz Institute for Educational Trajectories (LIfBi), Germany.

Jan Skopek

Saved results

nepsmiss saves the following in r():

Scalars

r(changed) total of recoded values in the dataset

Also see

NEPStools, char, label language, mvencode, mvdecode, recode, labmv (if installed)