Statalist


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

Re: st: AW: how to display value label


From   "B. Timothy Walsh" <btw1@columbia.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: AW: how to display value label
Date   Tue, 18 Aug 2009 16:49:28 -0400

Thank you both very much!
Tim

--On Tuesday, August 18, 2009 9:04 PM +0100 Tirthankar Chakravarty <tirthankar.chakravarty@gmail.com> wrote:

<>
This might help you in extracting labels for other purposes in a loop:
*******************************
sysuse auto, clear
local forlab: value label foreign
forvalues x = 0(1)1 {
	local label: label `forlab' `x'
	di "`label'"
       graph twoway scatter price mpg if foreign == `x', by(rep78)  ///
               saving(wtbywk`label', replace) title("Wt/Wk Group =
`label'") }
*******************************

T
On Tue, Aug 18, 2009 at 8:52 PM, Martin Weiss<martin.weiss1@gmx.de> wrote:

<>


The "scaffolding" around your primary question poses no special
problems, so the solution to your problem is as easy as:

***
sysuse auto, clear
tw (scatter price foreign), xlabel(minmax, angle(forty_five) valuelabel)
***




HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von B. Timothy
Walsh
Gesendet: Dienstag, 18. August 2009 21:49
An: statalist@hsphsun2.harvard.edu
Betreff: st: how to display value label

I have a categorical numerical variable with attached value labels.
Novice question: How would I get the value labels to display rather than
the values in something like this:

forvalues x = 0(1)1 {
       display `x'  //just for experimenting
       graph twoway scatter wt wk if group == `x', by(id)  ///
               saving(wtbywk`x', replace) title("Wt/Wk Group =
`x'") }

Thanks!
Tim
*
*   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/


*
*   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/




--
To every ω-consistent recursive class κ of formulae there correspond
recursive class signs r, such that neither v Gen r nor Neg(v Gen r)
belongs to Flg(κ) (where v is the free variable of r).

*
*   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/



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