Statalist


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

st: RE: variable label length limit


From   Phil Schumm <[email protected]>
To   [email protected]
Subject   st: RE: variable label length limit
Date   Sun, 7 Feb 2010 13:07:44 -0600

On Feb 7, 2010, at 11:55 AM, Nick Cox wrote:
The primary purpose of variable labels in Stata is surely better labelling of variables within tables and graphs. The reluctance of Stata to change the length limit does not, I think, arise from any memory limit that would bite hard, but from the fact that variable labels much over 80 characters would hardly be readable in most cases. In most cases they would need to be truncated.

That's not to deny that in circumstances like yours many users want to store metadata with their data.

The very longstanding Stata answer is to consider using characteristics. See -char- or -notes-.


I would echo Nick's comment here -- you don't typically want the question text of an item in the variable label (especially if it exceeds 80 chars), since it often doesn't make for a good row or column heading. For survey data, we store the full question text -- along with any additional instructions, prompts, etc. -- in one or more characteristics. This makes it easily accessible, both during interactive use and when generating reports.

WRT translating from SPSS, are you sure that Stat/Transfer doesn't provide an option to transfer long variable labels into Stata notes (which, BTW, are themselves implemented as characteristics)? If not, then it should be straightforward to write an SPSS command which would generate a do-file to add the notes that you could execute against the translated dataset.


-- Phil

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index