I am trying to build ARIMA model, I have 144 terms in my standardized time series, which represent residuals form original time series. This residuals, on which I would like to build ARIMA model, are obtained when I subtracted linear trend and periodical component from original time series, so residuals are stochastic component.

Because of that subtraction I modeled residuals like stationary series (d=0), so model is ARIMA(p,d,q)=ARIMA(?,0,?).

ACF and PACF functions of my residuals are not very clear as cases in literature for identification ARIMA models, and when I choose parameters p and q according to criteria that they are last values outside of confidence interval, I got values p=109, q=97. Matlab gave me error for this case:

Error using arima/estimate (line 386)

Input response series has an insufficient number of observations.

On the other side, when I am looking only to N/4 length of time series for identifying p and q parameters, I got p=36, q=34. Matlab gave me error for this case

Warning: Nonlinear inequality constraints are active; standard errors may be inaccurate.

In arima.estimate at 1113

Error using arima/validateModel (line 1306)

The non-seasonal autoregressive polynomial is unstable.

Error in arima/setLagOp (line 391) Mdl = validateModel(Mdl);

Error in arima/estimate (line 1181) Mdl = setLagOp(Mdl, 'AR' , LagOp([1 -coefficients(iAR)' ], 'Lags', [0 LagsAR ]));

How do I need to correct identify p and q parameters and what is wrong here? And wwhat does it mean in this partial autocorrelation diagram, why are last values so big?

ACF of time series PACF of time series

  • 1
    $\begingroup$ Identifying the optimal or even a fairly good ARIMA model in a non-random way is a complex task. I find that your method is very naive since p=36 and q=34 sounds massive for the time series in question. I'm not familiar with Matlab's time series toolboxes but have you tried the 'forecast' package in R? $\endgroup$
    – Digio
    Dec 24 '17 at 19:07
  • 1
    $\begingroup$ Your ACF shows strong seasonality, see also here. Try a seasonal ARIMA model. Orders above 30 are outlandish, and this problem also should go away once you fit seasonal ARIMA. $\endgroup$ Dec 24 '17 at 21:16
  • $\begingroup$ Ok @Digio , do you think that R is better in this sense? $\endgroup$
    – nick_name
    Dec 25 '17 at 14:26
  • $\begingroup$ Neural network autoregression from the forecast package fitted your data fairly well with a NNAR(13,1,7)[12] model. Not saying it can't be further improved, but it has outperformed much of the statistical models I tried (from both auto.arima and my own tools). There seems to be a strong exogenous effect on your series, getting that data in there would improve your prediction significantly. $\endgroup$
    – Digio
    Dec 25 '17 at 19:01

Please post your OBSERVED data and I will try to help you . Neither matlab or the 'forecast' package might (will) be of any use to you as their underlying assumptions may not be met by your data i.e. no pulses/level shifts/local time trends .. constant error variance & constant parameters over time. To use their software you might have to use "cleaner" data or a textbook example.

In terms of hints when analyzing residuals from a tentative model please look at If I am convinced that a series is mostly trend+season, what is it I should check about the residuals? and also here What do you think of this correlogram? . My initial guess is as @Digio suggested you are mis-understanding model identification strategies.


Your data is here enter image description here . In terms of "actions have unintended consequences" you elected to filter/transform the data by applying some sort of seasonal equation thus injecting unwanted structure into your data much like putting on someone else's glasses glasses to read the paper.

enter image description here The acf of the original data is here. AUTOBOX ( a piece of software that I have helped to develop) my tool of choice found that the "best way" to transform this data was to segment it into two sections 1-57 and 58-144 as model form parameters changed over time at this point see an example of AUTOBOX's transparency based upon the CHOW test enter image description here.

The analysis of these 87 values lead to the following model enter image description here .. 5 anomalies plus (1,1,0) and here enter image description here with statistics here enter image description here

The plot of the residuals is here enter image description here with acf here enter image description here . The forecasts are here enter image description here

The series was introduced as a seasonal series of frequency 12 but seasonal structure was never substantiated.

The moral of this story(analysis) is transform when necessary .

  • 1
    $\begingroup$ If you receive the data, you will put it into a box called Autobox and it will spit out some result. This will give little if any intuition for the user of how and why the result is what it is. How is that supposed to help? Yes, Autobox might overfit nicely in sample but is it competitive out of sample? The M competition data does not suggest so, as per previous posts. So before criticizing the other packages, better make sure to create some value for the particular user with or without Autobox. (In any case, a very Merry Christmas to you and everyone reading!) $\endgroup$ Dec 24 '17 at 20:04
  • $\begingroup$ Thank you. The step by step audit is probably what I was looking for, not necessarily for myself but definitely for answering questions here. Your remark on the old vs. new version is a good point, too. A remaining quibble is that the Autobox output includes a lot of things and it might be difficult to pin down the parts relevant for the particular question. But if you not only post the whole output but also highlight and comment on the parts answering the OP's question(s) directly, that would be great. Finally, the comment by Stephen Kolassa shows that a very simple answer might suffice. $\endgroup$ Dec 25 '17 at 6:49
  • $\begingroup$ Here is the announcement of the M4 competition, perhaps a good venue to measure the capabilities of Autobox against its competitors. $\endgroup$ Dec 25 '17 at 7:32
  • $\begingroup$ We are awaiting the release of the M4 data on 1/1/2018 . How do I post a long detailed htm file as an attachment to a response, I could put it up on the AUTOBOX website as a link. $\endgroup$
    – IrishStat
    Dec 25 '17 at 10:58
  • $\begingroup$ I am posting my observed data, that are monthly time series for period 2004-2015. Before ARIMA testing I excluded linear trend and macroperiodical component from my series, so I am analyzing with ARIMA second residuals-time series without linear trend and macroperiodic component (modeled according to Fourier series). I am still not sure did I miss something in that procedure before ARIMA or after appliaction of ARIMA model to my time series? drive.google.com/open?id=1zWwtsiSABuq9ynAc9cVrEsEfdJX0DgN6 $\endgroup$
    – nick_name
    Dec 25 '17 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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