Statalist


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

Re: st: "dirty trick": metadata in extended missing value labels


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: "dirty trick": metadata in extended missing value labels
Date   Mon, 16 Nov 2009 07:41:57 -0800 (PST)

--- On Mon, 16/11/09, [email protected] wrote:
> the following is a "dirty" but - at least for me - useful
> trick:
> 
> I produce a lot of graphs in batch mode. Layout usually
> needs a lot of tweaking (titles, labels, formats).
<snip>
> It would be nice to be able to attach such display
> information to the variable, so one could take these
> meta-parameters from the dataset instead of specifying
> them by hand each time. There seems to be no regular way
> to do so. 
> As a workaround for this, labels for extended missing
> values (.a, .b, .c ... .z) came to my mind which can be
> set for all numerical variables. I never use any more
> than ".a" or ".b" so why not store some information
> in the value label of some (by me) unused missing value
> like ".l"?
<snip>

You can make your trick less "dirty" by storing this
meta-information in what is called in Stata 
-characteristics-, see : -help char-. This allows
you to attach this kind of information to a variable
without running the risk that you get weird results
when at some future date you do happen to use the ".l"
extended missing value. You can extract that 
information using -char- extended macro function, see:
-help extended_fcn-

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------





      

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index