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: disable 32 character limit


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: disable 32 character limit
Date   Mon, 20 Sep 2010 10:56:47 +0100

David kindly mentions -ds3- from SSC in passing. As author I consider that command superseded by -findname-, as described in and downloadable from 

SJ-10-2 dm0048  . . . . . . . . . . . . . .  Speaking Stata: Finding variables
        (help findname if installed)  . . . . . . . . . . . . . . .  N. J. Cox
        Q2/10   SJ 10(2):281--296
        produces a list of variable names showing which variables
        have specific properties, such as being of string type, or
        having value labels attached, or having a date format

-ds3- retains some advantage only for those on Stata 7 or Stata 8. -findname- requires Stata 9. 

Nick 
[email protected] 

David Elliott
==============

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.


*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index