[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Re: value labels for strings: last comments
--On Monday, October 28, 2002 2:33 -0500 Richard wrote:
These issues display a fundamental misunderstanding of the underlying
Subject: st: RE: Re: value labels for string variables
It requires several extra steps. And encoding one database results in
different encodes for another. But most generally, suppose I had several
variables with the same code set? - as is the case.
There is only one set of definitions linking short and long forms of the
string variable, thus only one data set containing those definitions, which
may be merged onto any number of other 'real' datasets, which will then
contain the long forms of the strings.
The fact that '111' may refer to the 111th disease in integer variable
'diseasecodes' and the 111th zip code in 'zipcodes' is immaterial. They
will still display the appropriate contents.
Erik S. said he didn't want to modify a number of huge data sets, which are
used by others. If Stata did have a command to crwate long labels as
aliases for short labels, how would one attach the long labels without
modifying the data sets on disk? The point is, Stata does have commands
that will enable this feature, and they are just about as succinct as they
can imaginably be. You do only need set up the definitions of short and
long labels once, and merge them--once--onto a dataset in which you want
the long labels. You can also apply that definition to any variable(s) you
choose--e.g. if you have the patient's zip code and the physician's zip
code, and want them each displayed as city|state, just merge 'zipcodes'
(containing zip+4 and city,state) with each string-encoded zip code
* For searches and help try: