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

st: graph with valuelabel


From   Ricardo Ovaldia <[email protected]>
To   [email protected]
Subject   st: graph with valuelabel
Date   Mon, 10 Oct 2005 10:48:38 -0700 (PDT)

Dear all,

I do not understant why this does not work as I
expected.
 
. encode gender,gen(sex)

. graph twoway  (lfit lhomo  sex if case==0, sort), 
xlabel(1 2,valuelabel)

I expect the s=xaxis to be label "M" and "F" instead
is 1 and 2. 
I know that I can use -label define- instead, but I
think this should work because a valuelabel is
created:
. tab  sex

     gender |      Freq.     Percent        Cum.
------------+-----------------------------------
          F |        254       47.21       47.21
          M |        284       52.79      100.00
------------+-----------------------------------
      Total |        538      100.00

. tab  sex, nol

     gender |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |        254       47.21       47.21
          2 |        284       52.79      100.00
------------+-----------------------------------
      Total |        538      100.00

. des sex

              storage  display     value
variable name   type   format      label      variable
label
-------------------------------------------------------------------------------
sex             long   %8.0g       sex        gender


What am I doing wrong.

Thank you,
Ricardo.



Ricardo Ovaldia, MS
Statistician 
Oklahoma City, OK


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
*
*   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