Bookmark and Share

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

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

Re: st: Yeo-Johnson Power Transformation

From   Maarten Buis <>
Subject   Re: st: Yeo-Johnson Power Transformation
Date   Wed, 19 Dec 2012 10:47:26 +0100

On Wed, Dec 19, 2012 at 4:27 AM, Daniels, Joseph  wrote:
> I need to use the Yeo-Johnson transformation as my data contains zero and negative values along with positive values. I used an old Statalist thread to try copy and edit the boxcox.ado and boxco_l.ado files with no success. Are ado files for Yeo-Johnson archived anywhere or are there any recent instructions on how to edit the Boxcox files?

I am usually not convinced by such methods. It is too often used to
avoid making hard decisions. In the end, the choice of model must be
made by the investigator and no computer program can take that
responsibility away. Moreover, I would not use a non-linear transform
the variables unless I really really really have to. Often using link
functions in a -glm- context is much better, as that way you can have
the transformation and stick to effects in the original metric of the

If I would still want to implement this, I would look at the
boxcox.ado and boxco_l.ado files, but I would not start with them. I
would start with recreating a maximum likelihood estimator for linear
regression in a .do file without any bells and wistles, and step by
step move up from there. I would be continuously looking things up in

Hope this helps,

Maarten L. Buis
Reichpietschufer 50
10785 Berlin

*   For searches and help try:

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