Using the R package MASS, I transformed a variable, let's call it $V$, into another variable called $X$ with $\lambda = 1.25$.

Now, the BoxCox transformation has the following shape:

$X = (V^\lambda - 1) / \lambda$

So the reverse transformation is:

$V = (\lambda X + 1)^{1/\lambda}$

With $\lambda = 1.25$, $V < 1$ implies that $X < 0$. However, the reverse transformation only works for positive values with $\lambda = 1.25$. I therefore want to add a constant to $X$ before doing the reverse transformation. Let's call it $Z$ such that :

$Z = \begin{cases}1 - \mbox{min(X)} , & \mbox{if min(X) < 0}\\ 0 , & \mbox{otherwise}\end{cases}$

Then the reverse transformation becomes:

$V + E = (\lambda X + \lambda Z + 1)^{1/\lambda}$

Question: What transformation do I apply to $V + E$ in order to get back the true value $V$ only ?


The Box-Cox family (I like the name a lot, but am not related to Sir David Cox) has the form it has so that powers and the logarithm belong neatly together and have similar behaviour around the origin.

But while that is satisfying in principle, it need not govern what you do in practice. For example, if square roots ($\lambda = 0.5$ or $V^{0.5} = \root \of V$) are a good idea, I know of no reason whatsoever why $(\root \of V - 1) / 0.5$ is a better idea; indeed it's just an unnecessary linear re-expression of square roots and has the same statistical consequences.

Similarly, if analysis points to $1.25$ as a power, I might use $V^{1.25}$ defined for positive and negative values alike as $\text{sign}(V) |V|^{1.25}$. Actually, I would need a strong reason not to use a variable as it comes for a power so close to $1$.

  • $\begingroup$ Please, consider that this is part of a bigger project and people, other than myself decided to go for $\lambda$ ranging from -2 to +2 with steps of 0.25. I also need to apply the Box-Cox transformation as it has been implemented in R which corresponds to the above formula I gave. $\endgroup$ – Yohan Obadia Sep 6 '16 at 12:11
  • 2
    $\begingroup$ That sounds like a very strange strategy to me. It's just numerology to suppose that transformations in the sequence $-2(0.25)2$ are somehow privileged over others. You will make the decisions here, but in terms of general advice I maintain that Box-Cox like anything else is servant, not master. In their own paper they apply logarithms and reciprocals directly to their practical examples. In other words, the Box-Cox analysis points to transformations, but you are not obliged to use that unifying formula for what you do. $\endgroup$ – Nick Cox Sep 6 '16 at 12:20
  • $\begingroup$ I understand and will refer it to the higher ups to revise our strategy. However, do you have any idea as to how to make the transformation I need, at least for learning purpose and also to provide an implementation alternative ? $\endgroup$ – Yohan Obadia Sep 6 '16 at 12:27
  • 1
    $\begingroup$ Sorry, but no; I won't recommend exactly how you do something that seems at least unnecessarily complicated, if not misguided. $\endgroup$ – Nick Cox Sep 6 '16 at 12:29
  • $\begingroup$ You understand that for now I can't accept your answer. I will tink about it some more however and get back to you asap. Thank you again for your help. $\endgroup$ – Yohan Obadia Sep 6 '16 at 12:55

There are two versions of the Box-Cox transformation: the one-parameter version (as above), and the two-parameter version, which is applied if some values of V are observed to be negative, or could be negative, in which case you transform V' using Box-Cox, where V'=V+ß. In most practical applications, it's usually OK to set ß=-MIN(V), but if you have some prior knowledge about the possible range of values of V, then it's even better.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.