Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Towards publication quality output


From   [email protected] (William Gould, Stata)
To   [email protected]
Subject   Re: st: Towards publication quality output
Date   Mon, 25 Aug 2003 09:34:44 -0500

Fred Wolfe <[email protected]> wrote, 

> I want to suggest to the Stata community extensions to the way Stata 
> handles variable labels, as it I think such additions can lead to better 
> looking tables and other outputs.

Fred then went on to make detailed suggestions.  Meantime, unbeknowst to Fred,
we here at Stata have also been working on extending the -label- command, and
that will be contained in the next executable update, or the one thereafter.

The extensions we have made allow you to create multiple sets of sets of
value, variable, and dataset labels.  Our intention was that these multiple
sets be used to record different spoken languages:  A dataset might contain
one set in English, another in German, and perhaps a third in Spanish.  Up to
100 languages are allowed.  Although we conceived of the command to aide
persons needing to prepare datasets in multiple languages, there is no system
requirement that the multiple sets be used in that way.  You could create a
dataset with long and short labels.

The new command is -label language-.  With it, you might do the following:

        . label var mpg "MPG"
        . label var weight "Weight"
        . label define rep78short 1 "..." 2 ...
        . label values rep78 rep78short
        . label language short, rename        <- call those labels "short"

        . label language long, new copy       <- duplicate and call "long"
        . label var mpg "Miles per Gallon"
        . label var weight "Weight in lbs."
        . label define rep78long 1 "..." 2 ...
        . label values rep78 rep78long

        . label langauge short                <- use the short labels
        . tabulate ...

        . label language long                 <- use the long labels
        . tabulate ...

This is, admittedly, not exactly what was requested by Fred, but it is a 
step along the suggested path.  Just as Fred suggested, we implemented 
-label language- using characteristics, but that's part of the "Methods and 
formulas" documentation, and is not important except for programmers who 
wish to access this new feature to extend it further.

-- Bill
[email protected]
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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