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 on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: disable 32 character limit


From   David Elliott <dcelliott@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: disable 32 character limit
Date   Thu, 16 Sep 2010 11:45:53 -0300

I am sure there are many variable naming systems out there and as the
number of variables increases, the need to have a process to logically
and hierarchically name variables and their derivatives grows.  I find
it interesting that a number of large government sponsored surveys
with 200+ response items use a system that stems variable-names into
groups:
e.g.
identifiers id001 id002 id003
demographics dem001 dem002 dem003
occupation occ001
education ed001
diet di001
and so on.

The great utility of this naming is that one can use varlist syntax
like dem* ed* or occ003-occ005.

Datasets prepared this way come with variable labels and metadata,
frequently in spreadsheet format.  I have had no problem importing the
data and then modifying the metadata file to allow me to create the
variable labels and store the metadata in either a note or
characteristic.  (When characteristics became available they were
superior to notes because they could be specifically named, e.g. you
can have a characteristic -varname[meta] metadata about varname- )

A methodical analyst can employ these features and use commands like
-ds- (check out also -ds3- on SCC) or -lookfor- to return varlists for
use in subsequent commands.

May I suggest, Helge, that you have the right idea, but that you
should investigate all the wonderful things you can do with variable
labels and notes/characteristics instead of trying to cram all the
power into a 32 character variable name.

DC Elliott
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index