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: RE: bcskew0 transform back

From   "Nick Cox" <>
To   <>
Subject   st: RE: bcskew0 transform back
Date   Tue, 18 May 2010 17:31:58 +0100

I don't understand this desire. 

The back-transform of a transform (meaning invertible transform) of a
variable is just the original variable. 

If you had gone ln(mpg), then exp(ln(mpg)) gets you back again but you
might as well go directly to mpg. 

These commands are doing something a bit more complicated but the same
principle applies. Or what am I missing? 


raoul reulen

After i used bcskew0 I want to transform the relevant variable back.
How would I do this? For lnskew0 I do it like this:

.sysuse auto
.lnskew0 lnmpg = mpg
.local gamma = r(gamma)
.replace lnmpg = exp(lnmpg) + `gamma'

but I cannot work out how to do this for bcskew0. Obviously I need to
save r(lambda) to a local, but I can't get it right. Any suggestions?

.sysuse auto
.bcskew0 lnmpg = mpg
.local lambda=r(lambda)

*   For searches and help try:

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