I have a monthly time series of online visits for last 3 years starting from Jan 2016 to Dec 2018 and need to forecast for 2019. The data clearly has an upward trend although no seasonal lags significant. I assumed i will get a forecast where there is an upward trend as there is trend historically along with some variations but what i got is flat forecast.

Various answers in earlier post suggests flat forecast is acceptable either for white noise or random walk series but that is not the case here.

Time plot of my series: enter image description here

acf and pacf plot shows correlation exist although no seasonal lags significant

enter image description here

 model <- auto.arima(data_ts) #,lambda = best.lambda 

enter image description here

The residual analysis is perfect and no serial correlation exists enter image description here

On forecasting for next 12 months of 2019 these is what i got

forecasts <- forecast(model,12)

enter image description here

If i go with the seasonal plot of both historical data along with 2019 forecast these is how it looks

enter image description here

The series seems to be forecastable and therefore shouldn't my 2019 forecast bit higher if i go by the past pattern? I did transformation also and values are nearby giving almost flat line. Is there anything that i need to take care off? Any suggestion is highly appreciated!

Here is my data:


 a <- c(1056839, 1326049, 1042199, 1738067, 1647886, 1400829, 1268237, 2146656, 1036955, 1118508,
    1287044, 1501017, 3143967, 2092133, 2576878, 3184591, 2803422, 3064013, 4235912, 1573469,
    1962265, 2044005, 3820864, 1995260, 5441314, 2406231, 4009222, 4402667, 4717253, 4564327,
    6128167, 7649497, 3919549, 3408183, 4677126, 3202102)
  data_ts <- ts(a,start = c(2016,01),frequency = 12)
  • $\begingroup$ Please, the name of the famous software is R! I edited for now ... $\endgroup$ Commented Feb 27, 2022 at 23:34

1 Answer 1


Your residual plot clearly supports your concern about your model. I took the 36 values into the R version of AUTOBOX ( a time series package that I helped to develop) and it was able to extract a model that has seasonal structure .. two seasonal pulses January and July reflecting assignable cause.

The Actual,Fit and Forecast is here enter image description here

The acf of the observed data is here enter image description here

The acf of the residual series is here enter image description here

The equation is here enter image description here

with statistics here enter image description here and here enter image description here

The cleansed data shows the onset of the two seasonal pulses and one anomaly (2018/9 ) here enter image description here

The Forecast plot is here with bootstrapped prediction intervals for the period 2019/1 - 2019/12 enter image description here

In summary the software you are using does not 1) identify the need for seasonal deterministic structure as is needed here and 2) identify and adjust for pulses as is needed here and 3) incorrectly uses the "flawed" acf of the original series rather than the acf of an adjusted series that is conditioned for the three deterministic effects ( 2 seasonal pulses and 1 pulse) 4) does not consider the presence of level shifts or deterministic time trends and only considers differencing as the appropriate remedy for non-stationarity in the expected value. See How to make a time series stationary? AND specifically https://stats.stackexchange.com/users/3411/tom-reilly guidance on this.

"The correlogram should be calculated from residuals using a model that controls for intervention administration, otherwise the intervention effects are taken to be Gaussian noise, underestimating the actual autoregressive effect." was wisely pointed out by @Adam0 in Interrupted Time Series Analysis - ARIMAX for High Frequency Biological Data?

The correctly identified arima structure is a (1,0,0) with one coefficient of lag2 . This could be restated as (2.0.0) with the first lag omitted.

To summarize ... test there is clearly seasonal structure BUT at this point in time no provable persistent trend thus the FLAT forecast that is not quite flat but seasonal without trend.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.