Returns the BoxCox transformation of the input data point(s).
Syntax
BOXCOX(X, Alpha, Lambda, Return_type)
X the real number for which we compute the transformation.
Alpha is the input shift parameter for X. If omitted, the default value is 0.
Lambda is the input power parameter of the transformation, on a scale from 1 to 0. If omitted, the default value of 0 is assumed.
Return_type is a number that determines the type of return value: 1 (or missing)= BoxCox , 2= Inverse BoxCox, 3= LLF of BoxCox.
RETURN_TYPE  NUMBER RETURNED 

1 or omitted  BoxCox Transform 
2  Inverse of BoxCox transform 
3  LLF of BoxCox transform 
Remarks
 BoxCox transform is perceived as a useful data (pre)processing technique used to stabilize variance and make the data more normally distributed.
 The BoxCox transformation is defined as follows:
$$ T\left ( x_{t}; \lambda, \alpha \right ) = \begin{cases} \dfrac{\left ( x_{t} + \alpha \right )^{\lambda}1}{\lambda} & \text{ if } \lambda \neq 0 \\ \log \left ( x_t + \alpha \right ) & \text{ if } \lambda= 0 \end{cases} $$
Where:
 $x_{t}$ is the value of the input time series at time $t$
 $\lambda$ is the input scalar value of the BoxCox transformation
 $\alpha$ is the shift parameter
 $\left(x_t +\alpha \right) \gt 0$ for all t values.
 The BOXCOX function accepts a single value or an array of values for X.
 The shift parameter must be large enough to make all the values of X positive.
 To compute the loglikelihood function (LLF), the BoxCox function assumes a Gaussian distribution which parameters ($\mu,\sigma^2$) are calculated using the maximumlikelihood estimate (MLE) method.
$$LLF_{\textrm{BoxCox}} = \frac{N}{2}\times\left( \ln\left( 2\pi\hat{\sigma}^2\right)+1\right) $$
$$\hat{\sigma}^2=\frac{\sum_{t=1}^N{\left(y_t\mu\right )^2}}{N}$$
Where:
 $\hat{\sigma}^2$ is the biased estimate of the variance.
 $N$ is the number of nonmissing values in the sample data.
 $y_t$ is the tth transformed observation.
Examples
Example 1:


Formula  Description (Result)  

=BOXCOX($B$2:$B$30,3,0.5,3)  LLF Boxcoc (33.35) 
Files Examples
References
 James Douglas Hamilton; Time Series Analysis; Princeton University Press; 1st edition(Jan 11, 1994), ISBN: 691042896
 Tsay, Ruey S.; Analysis of Financial Time Series; John Wiley & SONS; 2nd edition(Aug 30, 2005), ISBN: 0471690740
 D. S.G. Pollock; Handbook of Time Series Analysis, Signal Processing, and Dynamics; Academic Press; Har/Cdr edition(Nov 17, 1999), ISBN: 125609906
0 Comments