Date: Tue, 31 Jul 2007 20:09:58 -0400
Reply-To: Lou <lpogodajr292185@COMCAST.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lou <lpogodajr292185@COMCAST.NET>
Subject: Re: Variable names and variable labels - various questions
"Peter Flom" <peterflomconsulting@mindspring.com> wrote in message
news:14154767.1185899157685.JavaMail.root@mswamui-chipeau.atl.sa.earthlink.net...
> Hello
>
> I have inherited a data set with 1947 variables. Most of these have
variable names like VAR1, VAR2, all the way to VAR1922. These have variable
labels that are short, but meaningful (if a little cryptic to the
uninitiated - e.g. BApT3T5B)
>
> In the past, I have always given my variables names that mean something.
>
> My questions:
> 1) Are there reasons for keeping the variable names as they are?
> 2) If so, what are the advantages and disadvantages of this style (i.e.
meaningless name with sensible label) vs. the one I am used to?
> 3) If the advantages are slight and the disadvantages large, is there a
way to change the variable names?
>
> I will be using this data set for a long time, so it would be worth it to
me to spend some time doing this.
>
> Thanks in advance, as always
Back in the day, variable names were limited to 8 characters. Under those
circumstances, it can get pretty hard to give 1,947 variables names that are
"meaningful". I can remember trying to distinguish between names like
mxjblh and mxjb1h - both are equally devoid of meaning to someone unfamiliar
with the dataset as names like var1 and var2. At least with the var1, var2
short of scheme you have a chance of finding the variable you're interested
in something like the viewer or a proc print (assuming the variables were in
the named order on the dataset).
If you've inherited this dataset, and it doesn't get updated periodically by
some process that expects the names it already has, I see nothing wrong with
renaming variables, redoing labels, and reorganizing the variable order to
make it easier to use. The biggest disadvantage I can see offhand (aside
from the work it'll take) is that if you have any documentation for this
dataset, it'll become meaningless unless you update that as well.
|