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, statalist.org is already up and running.


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

Re: st: Yeo-Johnson Power Transformation


From   Maarten Buis <maartenlbuis@gmail.com>
To   statalist@hsphsun2.harvard.edu
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
variables.

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
<http://www.stata.com/bookstore/maximum-likelihood-estimation-stata/>.

Hope this helps,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index