2

I am working on this non linear data set, and running my Box-Cox I find that the best value to use is $\lambda = 0$.

If I understand correctly, $\lambda =2$ implies $Y^2$. Similarly, $\lambda = -0.5$ corresponds to $1 \over \sqrt Y$. However how would I work with a null lambda, all $Y$ values being made 0 makes little sense? NOT 0, 1

Any explanation would be much useful.

Laurent Duval
  • 2,077
  • 1
  • 20
  • 33
rannoudanames
  • 740
  • 1
  • 5
  • 20

2 Answers2

7

Box-Cox transformation is defined as

$$ y^{(\lambda)} = \begin{cases} \frac{y^\lambda - 1}{\lambda} & \text{if } & \lambda \ne 0, \\ \log(y) & \text{if } & \lambda=0. \end{cases} $$

For further details check the original paper that introduced it:

Box, G. E., & Cox, D. R. (1964). An analysis of transformations. Journal of the Royal Statistical Society. Series B (Methodological), 211-252.

So there is really nothing to interpret, it's simply a log transformation.


Also notice that $x^0 = 1$, so it would rather be all ones, rather than all zeros.

desertnaut
  • 278
  • 2
  • 10
Tim
  • 108,699
  • 20
  • 212
  • 390
  • Interesting is the function based on lambda continuous for all y? – rannoudanames Nov 06 '16 at 20:35
  • 1
    @rannoudanames $\log(y)$ is continuous, $(y^\lambda-1)/\lambda$ is also continuous, so yes. – Tim Nov 06 '16 at 20:43
  • 3
    More than that is true: for positive $y$ and real $\lambda$, the function $(y, \lambda)\to y^{(\lambda)}$ is differentiable. In particular, the natural logarithm arises as the limit of $y^{(\lambda)}$ as $\lambda \to 0$. – whuber Nov 06 '16 at 20:59
3

If you consider non-null $y$ values, the coefficient of variation of the Box-Cox transformation for a real $\lambda$-power near $0$ goes like: $$ \frac{\exp \left( \lambda\ \log y\right)−y^0}{\lambda−0}≈\frac{1+\lambda\log y−1}{\lambda}$$ as $\lambda$ tends to $0$. So the limit is $\log y$. So in a way, a constant behaves like a limit behaviour of the logarithm, or the other way around.

The logarithm is somehow dimensionless, or $0$-homogenous, like a constant. A personal and physical interpretation can be found at What is the logarithm of a kilometer? Is it a dimensionless number?. In short:

  • If you consider $y$ as a non-zero constant, $y^0=1$,
  • If you consider $y$ as a realisation of a continuous variable, you inherit a variational context, and the natural limit is a logarithm.
Laurent Duval
  • 2,077
  • 1
  • 20
  • 33