3

I have couple of questions in times series forecasting.

  1. If the time series is nonstationary, should we make it to stationary for running auto.arima OR will this function automatically convert it?

  2. How to optimise the auto.arima?

  3. If we take log of a time series to make it stationary, the forecasted values are in the log format. How do we convert them to the original scale?

Ferdi
  • 4,882
  • 7
  • 42
  • 62
  • what do you mean by "optimise"? – Ferdi Mar 25 '17 at 12:29
  • auto.arima achieves stationarity through differencing, which usually faces the problem regarding trends.. You transform data to control the variance, so that is on yourself. I would suggest the use of boxcox function to find the propert transformation. Furthermore you can then specify the lambda found in your call to arima and it will automatically convert your data to the original scale – Tommaso Guerrini Mar 25 '17 at 13:29
  • @Ferdi, I mean if we input the timeseries to auto.arima without making it stationary, assuming auto.arima converts it stationary, without giving any parameters like auto.arima(ts) and if the output is not satisfactory. How do we optimze, i mean which parameters i should tweak?. Pardon my ignorance, i am very much few to the forecasting. – Sethuram Kishore Mar 25 '17 at 14:32

2 Answers2

1

If the time series is nonstationary, should we make it to stationary for running auto.arima OR will this function automatically convert it?

auto.arima will automatically convert it. arima, is so-called "auto-regression integrated moving average", there is a parameters "d" which is used for the order of first-differencing.

How to optimise the auto.arima?

auto.arima doing this automatically optimise using the stepwise algorithm.

If we take log of a time series to make it stationary, the forecasted values are in the log format. How do we convert them to the original scale?

If you manually log the time series, then you should manually convert the forecast values to the original scale.

wolfe
  • 571
  • 5
  • 10
0

Be careful the presence of outliers will often cause the box-cox test to incorrectly suggest a power transformation that is uneeded . The box-cox test When (and why) should you take the log of a distribution (of numbers)? can often be misleading and should be used when the required assumptions are met i.e. no pulses , no seasonal pulses ; no level shifts and no trends in the residuals and of course no deterministic change points in error variance at particular points in time.

For more on this please see http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.469.7176&rep=rep1&type=pdf and in particular the section 7 on the "Effect of outliers and influential cases"

IrishStat
  • 27,906
  • 5
  • 29
  • 55