Bookmark and Share

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


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

Re: st: keeping variable labels after -collapse-


From   daniel klein <[email protected]>
To   [email protected]
Subject   Re: st: keeping variable labels after -collapse-
Date   Sun, 6 Jan 2013 18:09:21 +0100

I might be overlooking something here, but the question is/was about
_variable_ labels, not _value_ labels. As far as I see, -label save-
just saves and "restores" the latter. -uselabel- may be used, but it
seems more burdensome than the few lines of code Nick suggested.

Best
Daniel

-- 
The FAQ concerned dates to 2002 (revised 2003): there's a simple
question whether -label save- existed then. (I am away from my old
manuals.)

That said, the macro-based method has some uses. Kit's technique
presupposes that the variables have the same names before and after
-collapse-, and if that's so it solves the problem completely. But
once you start -collapse-ing to new variable names, you will need
something where you have more control.

Nick

On Sun, Jan 6, 2013 at 4:10 PM, Christopher Baum <[email protected]> wrote:
[...]
> Ingenious, but somewhat unncessary, as Stata will do this for you:
>
> label save using whatever.do
> replace...
> do whatever.do
>
> will restore the labels.
>
> Kit
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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