BoxCox

0th

Percentile

Box Cox Transformation

BoxCox() returns a transformation of the input variable using a Box-Cox transformation. InvBoxCox() reverses the transformation.

Keywords
ts
Usage
BoxCox(x,lambda)
InvBoxCox(x,lambda)
Arguments
x
a numeric vector or time series
lambda
transformation parameter
Details

The Box-Cox transformation is given by $$f_\lambda(x) =\frac{x^\lambda - 1}{\lambda}$$ if $\lambda\ne0$. For $\lambda=0$, $$f_0(x) = \log(x)$$.

Value

  • a numeric vector of the same length as x.

References

Box, G. E. P. and Cox, D. R. (1964) An analysis of transformations. JRSS B 26 211--246.

Aliases
  • BoxCox
  • InvBoxCox
Examples
lynx.sqrt <- BoxCox(lynx,0.5)
lynx.fit <- ar(lynx.sqrt)
plot(forecast(lynx.fit,h=20),lambda=0.5)
Documentation reproduced from package forecast, version 2.05, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.