Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: Preserve Variable Labels After Reshape


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Preserve Variable Labels After Reshape
Date   Thu, 20 Dec 2012 12:04:41 +0000

David here refers to -longshape-, but does not explain that it comes from SSC.

The help for -longshape- does explain that

"...More awkwardly, with a -reshape long- the variable labels of
varlist would disappear, so that it would be         necessary to save
them somewhere and put them back, or at worst to retype them. With
-longshape- the variable
labels, when they exist, become the value labels of a new variable."

Thus contrary to David's implication, -longshape- keeps the
information in the variable labels. Later postings in this thred made
it clear that it doesn't do so in the way that David wants, but that's
a different story.

Nick

On Thu, Dec 20, 2012 at 1:16 AM, David Torres <writeon4truth2@msn.com> wrote:
> I'm reshaping some data from wide to long and would like to preserve my variable labels.  Does anyone know an easy way to do this?
>
> I've already tried the user-written commands -longshape-, -reshape7-, and -reshape8-.  My variable labels were not preserved.
>
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index