Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Bug in graph box, over(... relabel)


From   "Elizabeth Allred" <[email protected]>
To   <[email protected]>
Subject   Re: st: Bug in graph box, over(... relabel)
Date   Mon, 18 Aug 2008 14:56:15 -0400

Thanks Rich,

I seem to have forgotten that relabel does NOT refer to the variable's codes (0 and 1) but to the first and second (1 and 2) values (ascending sort) of the variable.

Liz

>>> On 8/18/2008 at 2:45 PM, in message <[email protected]>, Richard
Goldstein <[email protected]> wrote:
> Liz:
> 
> I think you want the following:
> 
> graph box map, medtype(line) over(pdi, relabel(1 "70+" 2 "<70")) over(ga)
> 
> Rich
> 
> Elizabeth Allred wrote:
>> Most recent update (Aug 11, 2008) of Version 10.1 running under Windoze XP
>> 
>> I have a dichotomous 0/1 variable: 
>> 
>>             |
>>         PDI |      Freq.     Percent        Cum.
>> ------------+-----------------------------------
>>           0 |        706       69.08       69.08
>>           1 |        316       30.92      100.00
>> ------------+-----------------------------------
>>       Total |      1,022      100.00
>> 
>> 
>> Code 0 means 70+ and code 1 means <70.
>> 
>> I want a box & whiskers plot with those codes labeled:
>> 
>> graph box map, medtype(line) over(pdi, relabel(0 "70+" 1"< 70")) over(ga)
>> 
>> This should give an x axis like this:
>> 
>> ------------------------------------------------------------------------
>> 70+    <70     70+    <70     70+    <70     70+    <70     70+    <70
>>     23             24             25             26             27
>> 
>> What I get is this:
>> 
>> ------------------------------------------------------------------------
>> <70     1      <70     1      <70     1      <70     1      <70     1
>>     23             24             25             26             27
>> 
>> The axis is correct if I _label define ..._ and _label value ..._ the 
> variable _pdi_ before issuing the graph command.
>> 
>> Have I coded relabel in the graph command incorrectly or is this a bug?
>> 
>> Liz
> *
> *   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index