Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: "Label define" syntax for "all other values"

From   "Allan Reese (Cefas)" <>
To   <>
Subject   RE: st: "Label define" syntax for "all other values"
Date   Mon, 27 Sep 2010 09:59:23 +0100

Dan Waldo responds to solutions from Nick Cox and Eric Booth:
>Thank you, Nick. Having 2 distinct approaches is a consolation for not
having the 3rd approach. Creating a second >variable is a clean and
viable option, although I suspect its viability fades as the number of
variables needing this >treatment increases.

The "Third way" disappeared as an option last weekend [UK joke].

The solutions however do indicate three options, one not being
1) list all levels in the current data and assign a label to each
2) collapse all unlabelled levels to a single value (overwriting or in a
new variable) and add a label
3) syntax that would replace the default blank label with another

I suspect the last is what SAS offers.  Storing the same string for
every (otherwise) unlabelled value is wasteful, and fails if any value
is edited or new data added.  Providing an "unlabelled" label might be
another use of char.

Rather than add more features, the question is whether you would want
"tab x" to list all the levels of x (option 1) or just the labelled
levels plus a single extra line for "all others" (option 2). 

R Allan Reese
Senior statistician, Cefas
The Nothe, Weymouth DT4 8UB 

Tel: +44 (0)1305 206614 -direct
Fax: +44 (0)1305 206601 

This email and any attachments are intended for the named recipient only.  Its unauthorised use, distribution, disclosure, storage or copying is not permitted.  If you have received it in error, please destroy all copies and notify the sender.  In messages of a non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect those of the organisation from which it is sent.  All emails may be subject to monitoring.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index