nick_name
nick_name

Reputation: 161

Identify parameters of ARIMA model

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

Upvotes: 1

Views: 2249

Answers (1)

Tommaso Belluzzo
Tommaso Belluzzo

Reputation: 23675

This guide contains a lot of useful information about the correct estimation of ARIMA p and q parameters.

As long as I can remember from my studies, since ACF tails off after lag q - p and PACF tails off after lag p - q, the correct identification of p and q orders is not always straightforward and even the best practices provided by the above guide could not be enough to point you to the right direction.

Usually, a failproof approach is to apply an information criteria (like AIC, BIC or FPE) to several models with different orders of p and q. The model that presents the smallest value of the criterion is the best one. Let's say your maximum q and p desired order is 6 an that k is the number of observations, you could proceed as follows:

ll = zeros(6);
pq = zeros(6);

for p = 1:6
    for q = 1:6
        mod = arima(p,0,q);
        [fit,~,fit_ll] = estimate(mod,Y,'print',false);
        ll(p,q) = fit_ll;
        pq(p,q) = p + q;
     end
end

ll = reshape(ll,36,1);
pq = reshape(pq,36,1);

[~,bic] = aicbic(ll,pq+1,k);
bic = reshape(bic,6,6);

Once this is done, use the indices returned by the min function in order to find the optimal q and p orders.

On a side note, for what concerns your errors... well, the first one is pretty straightforward and is self-explanatory. The second one basically means that a correct model estimation is not possible.

Upvotes: 1

Related Questions