Title

nlabels(), vlabels() - Label display options

Syntax

nlabels(nl1 [, nl2])

vlabels(vl1 [, vl2])

where nl1 and nl2 are any combination of:

[ unlabeled ]
[ labeled[(charname)] ]
[ tip ]
[ nomark ]

and vl1 and vl2 are any combination of:

[ unlabeled ]
[ labeled ]
[ tip ]

Description

These options determine how variable names (nlabels()) and values (vlabels()) are displayed.

For some commands, different parts of the display - for example, the header vs body of a table - can be labeled differently by using a second set of suboptions; ie, nl2 and/or vl2.
If a command will interpret nl2 and/or vl2, that fact, and the part of the display affected, will be included in the command's documentation.

For each set of suboptions:

o- When unlabeled or labeled is specified alone, that variety of output is produced (tip has no effect when specified alone).

o- When unlabeled and labeled are both specified, both will be displayed, in the order specified.

o- When tip is specified along with unlabeled and/or labeled, the first of u or l is displayed, and the other (whether explicitly specified or not) is used as a 'tooltip'.

String variable names (labeled or not) are ordinarily prefixed with an asterisk which has "string variable" as a tooltip. nomark suppresses that prefix.

Note that for nl(), labeled can optionally include a parameter (ie, labeled(charname)), a characteristic name. If one is specified, that characteristic will take the place of the variable label.
This can be useful, eg, to provide descriptions longer than 80 characters.

Tooltips

Tooltips are produced in both HTML and Stata ouput, but they function a little differently:
In both cases you can view the tip by "hovering" the cursor over the link, but in Stata the tips show up in the status bar at the bottom of the window, rather than popping up over the link as they do in HTML.

Additional Details

o- Date and Time values are treated as though their formatted value is a label. That is, vlabels() will determine whether the raw and/or formatted value appears.

o- When both types of information (ie, u and l) are displayed together, missing labels are left blank;
however, when only labels are displayed (with or without tips), missing labels are filled in with the relevant unlabeled item.

o- Since names and their labels are both text, names are underlined when there is the possibility of confusion (eg, when filling in for a missing label).