Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: How to change scale of yaxis from proportion with lots of decimals to per 100000


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: How to change scale of yaxis from proportion with lots of decimals to per 100000
Date   Fri, 16 Nov 2012 12:33:01 +0000

Any confidence intervals will have to be calculated in terms of the
variables the graph uses.

If they are a factor of 10^5 out, you will notice that!

Nick

On Fri, Nov 16, 2012 at 12:07 PM, roland andersson
<[email protected]> wrote:
> Thank you Nick and Maarten
>
> For solution 1 and 2 will the plotted confidence intervals be correct?
> I want to try the solution nr 3. Or maybe just edit the graph
> afterwards
>
> I will read the Stata Tip
>
> I first used logscale and plotted the 4 lines in the same graph, but
> the results was much better when I used 4 separate graphs and not
> using logscale.
> Roland
>
>
>
> 2012/11/16 Nick Cox <[email protected]>:
>> There are various possible solutions.
>>
>> 1. -replace- the variable with itself multiplied by 100000.
>>
>> 2. -clonevar- the variable ditto.
>>
>> In either case, you will need to change the variable label if you are
>> like me and put units of measurement in variable labels.
>>
>> 3. Stata will accept  e.g. -ylabel(42 "foobar")- and so -ylabel(1
>> "100,000")- etc.
>>
>> 4. A helper command for #3 is -mylabels- (SSC).
>>
>> The principles here apply to nonlinear re-scales too. See
>>
>> SJ-8-1  gr0032  . . . . . . .  Stata tip 59: Plotting on any transformed scale
>>         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
>>         Q1/08   SJ 8(1):142--145                                 (no commands)
>>         tip on how to graph data on a transformed scale
>>
>> Accessible to all at http://www.stata-journal.com/sjpdf.html?articlenum=gr0032
>>
>> Nick
>>
>> On Fri, Nov 16, 2012 at 7:47 AM, roland andersson
>> <[email protected]> wrote:
>>> I want to make twoway graphs of the trend over time of the incidence
>>> rate of a rare disease by four groups where this disease varies
>>> strongly. In one group the disease has changed from 5 to 10 per
>>> 100,000 live births, in another from 5000 to 10,000 per 100,000 live
>>> births.
>>> I want to do the graphs by(groups). My problem is that the yscale
>>> shows the proportion with lots of decimals, eg 0.00005. I want to
>>> multiply the yscale with 100,000 so that it shows the number per
>>> 100,000 live births instead of the proportion with decimals. How can I
>>> do it?
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index