Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

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

st: twoway, xscale( exp )?

From   Stas Kolenikov <>
Subject   st: twoway, xscale( exp )?
Date   Fri, 12 Aug 2011 12:05:27 -0400

I have performed some analysis for a variable in its log scale, and I
wanted to graph these results (a moderately complex combination of
several -twoway- plots) showing the original scale of the variable.
There is -xscale( log )- option to go from $ to log($) for income
distributions and from OR to logit coefficients in binary models, but
I could not find an option that goes the other direction to
exponentiate things for labeling purposes. Is it possible to
meaningfully emulate it? I have logs in the range of about 5 to 10
which translate to levels in the thousands range, so putting them on
the same graph, while technically possible, leads to totally obscure
(and simply wrong) pictures.

As an example, think about

sysuse auto, clear
gen lprice = log(price)
twoway (kdensity lprice) (hist lprice)

My idea is to have something like -twoway ... , xaxis(1 2)- with the
second axis showing the original dollar amounts.

Stas Kolenikov, also found at
Small print: I use this email account for mailing lists only.
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index