Re: [R] Help! - boxcox transformations

From: Peter Dunn <>
Date: Fri, 14 Dec 2007 12:02:59 +1000

> I am trying to detrend and transform variables to achieve
> normality and stationarity (for time series use, namely spectral
> analysis). I am using the boxcox transformations.
> As my dataset contains zeros, I found I need to add a constant to
> it in order to run "boxcox".

If your data are continuous with exact zeros, and contain a lot of zeros, no transformation may help. You simply map a stack of zeros to some other value. Box--Cox transforms are not really designed for this.

If your data really is continuous with exact zeros, other options exist such as hurdle models, Tweedie glms (package tweedie) and so forth.


Dr Peter Dunn  |  dunn <at>
Faculty of Sciences, USQ;
Aust. Centre for Sustainable Catchments:

This email (including any attached files) is confidentia...{{dropped:15}}

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 14 Dec 2007 - 02:16:30 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 14 Dec 2007 - 02:30:18 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.