https://github.com/cran/forecast
Revision 9d166823f2b5f5a97a20bd5829bc3b5f3e60459b authored by Rob J Hyndman on 30 September 2013, 00:00:00 UTC, committed by Gabor Csardi on 30 September 2013, 00:00:00 UTC
1 parent 4e991f8
Raw File
Tip revision: 9d166823f2b5f5a97a20bd5829bc3b5f3e60459b authored by Rob J Hyndman on 30 September 2013, 00:00:00 UTC
version 5.0
Tip revision: 9d16682
BoxCox.Rd
\name{BoxCox}
\alias{BoxCox}
\alias{InvBoxCox}
\title{Box Cox Transformation}
\usage{BoxCox(x, lambda)
InvBoxCox(x,lambda)
}
\arguments{
\item{x}{a numeric vector or time series}
\item{lambda}{transformation parameter}
}
\description{BoxCox() returns a transformation of the input variable using a Box-Cox transformation.
InvBoxCox() reverses the transformation.
}
\details{The Box-Cox transformation is given by
\deqn{f_\lambda(x) =\frac{x^\lambda - 1}{\lambda}}{f(x;lambda)=(x^lambda - 1)/lambda}
if \eqn{\lambda\ne0}{lambda is not equal to 0}. For \eqn{\lambda=0}{lambda=0},
\deqn{f_0(x)=\log(x)}{f(x;0)=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. \emph{JRSS B} \bold{26} 211--246.
}
\seealso{\code{\link{BoxCox.lambda}}}
\author{Rob J Hyndman}
\examples{
lambda <- BoxCox.lambda(lynx)
lynx.fit <- ar(BoxCox(lynx,lambda))
plot(forecast(lynx.fit,h=20,lambda=lambda))
}
\keyword{ts}
back to top