## Thursday, May 13, 2021

### Box-Cox Transformation and the Estimation of Lambda Parameter

Authors and guest post by Eren Ocakverdi

This blog piece intends to introduce a new add-in (i.e. BOXCOX) that can be used in applying power transformations to the series of interest and provides alternative methods to estimate the optimal lambda parameter to be used in transformation.

### Introduction

A stationary time series requires stable mean and variance, which can then be modelled through ARMA-type models. If a series does not have a finite variance, it violates this condition and will lead to ill-defined models. Common practice in dealing with time varying volatility is modeling the variance explicitly through GARCH-type models. However, when the variance of a given series changes with respect to the level, then there is a practical alternative: transforming the original series so as to scale down (up) the large (small) values.

### Box-Cox family of transformations

Box and Cox (1964) proposed a family of power transformations, which later became a popular tool in time series analysis to deal with skewness in the data:

$$\tilde{y}_t = \begin{cases} \frac{y_t^\lambda - 1}{\lambda} & \text{if } \lambda \neq 0\\ log(y_t) & \text{if } \lambda = 0 \end{cases}$$ Transformation of a series is straightforward once the value of $\lambda$ is known. One way to determine the value of $\lambda$ is to maximize the (regular or profile) log likelihood of a linear regression model fitted to data. For trending and/or seasonal data, appropriate dummy variables are added to regressions to capture such effects. Guerrero (1993) proposed a model-independent method to select $\lambda$ that minimizes the coefficient of variation for the subsets of series.

### Application to Turkey’s Tourism Data

With its pervasive trend and seasonal components, monthly tourism statistics emerge as a natural candidate for implementation (TOURISM.WF1). Suppose that we want to carry out a counterfactual analysis to estimate the potential loss of visitors to Turkey in 2020 due to the COVID-19 pandemic. First, set the training sample to cover the period until the end of 2019.

 Figure 1: Visitors

Next, run the add-in. The following dialog pops up.

 Figure 2: Box-Cox Dialog

The add-in would compute the optimal value of lambda to be 0.106.

 Figure 3: Visitors (Box-Cox Transformation)

We can then apply Auto ARIMA method to original series and supply the value of estimated lambda to Box-Cox transformation as the power parameter. Forecasts produced by Auto ARIMA method can also be combined via Bayesian Model Averaging.

 Figure 4: ARIMA Forecasting Dialog

As an alternative approach, one can also perform ETS Exponential Smoothing method on the transformed series to select for the best model and then back transform the forecasted values.

 Figure 5: Visitors Loss

ARIMA model results imply that the number of visitors to Turkey might have decreased by 29 million during 2020. ETS model portrays an even worse picture by estimating a potential loss of 42 million visitors!

### References

1. Box, G.E.P., and Cox, D.R. (1964), "An analysis of transformations", Journal of the Royal Statistical Society, Series B, vol. 26, no. 2, pp. 211-246.
2. Guerrero V.M. (1993), "Time-series analysis supported by power transformations", Journal of Forecasting, vol. 12, pp. 37-48.

2. Lord Bubuza is a great seer, he is a man who reveals lottery numbers after casting a spell in his temple. My name is Keith Burge, I won a $1 million dollars power ball lottery game after He cast a spell for me and He gave me the lottery winning number. What more can say to thank him. I will forever be grateful to him. for more information contact him via website: Lordbubuzamiraclework.com or email: Lordbubuzamiraclework@hotmail.com 3. I met a friend whom i complained to about my inability to win a tangible sum and he introduced me to Dr Ilekhojie whom helped him with a lottery spell and he won$200,000. I contacted him through him and he assured me that I will win big once he performs the lottey spell for me. He asked me to give him 48 hours for him to get all what is needed for my lottery spell, so i waited for 48 hours and he instructed me to get a ticket depending on how much my heart choses. I bought a powerball ticket and became a millionaire when the draws came. Now i have enough money to set up my business after i was almost homeless. Thank you Dr Ilekhojie i am grateful. I leave his contact here for anyone who needs luck to win. Call him +2348147400259 or Email: gethelp05@gmail.com
5. I just want to say Thank You to everyone who supported me through the years. My name is Manuel Franco, New Berlin, Wisconsin. My story of how I won the Powerball lottery of $768.4M is a bit of a tale. I have been playing Powerball tickets for 6 years now since I turned 18. I bought my first ticket on my 18 birthday. I was feeling very lucky that day because I had contacted Dr. Odunga to help me with the winning Powerball numbers. I really had that great great feeling that I looked at the camera wanting to wink at it. I only did a tiny part of it and trusted him. He gave me the numbers after I played a couple other tickets along with it for$10. I checked my ticket after the winnings came online and saw the numbers were correct including the Power play. I screamed for about 10 minutes because it felt like a dream. I had won \$768.4M. You can check my winning testimony with the lottery officials just with my name search. Thank you Dr. Odunga. Well, his email is odungaspelltemple@gmail.com and you can also call or Whats-app him at +2348167159012 so you guys can contact him