suppose we following model
https://dsp.stackexchange.com/questions/15326/can-someone-show-the-details-of-how-to-apply-aic-for-sinusoidal-models-to-specif
where epsilon is white noise,i have tried following code
function [aic_matrix,bic_matrix]=ARMA_model(y,n);
%n possible order of each model
LOGL = zeros(n,n); %Initialize
PQ = zeros(n,n);
for p = 1:n
for q = 1:n
mod = arima(p,0,p);
[fit,~,logL] = estimate(mod,y,'print',false);
LOGL(p,q) = logL;
PQ(p,q) = p+q;
end
end
LOGL = reshape(LOGL,n*n,1);
PQ = reshape(PQ,n*n,1);
[aic1,bic1] = aicbic(LOGL,PQ+1,length(y));
aic_matrix=reshape(aic1,n,n);
bic_matrix=reshape(bic1,n,n);
end
but when i ran following command
[aic_matric,bic_matrix]=ARMA_model(B,100);
i got result
Error using arima/validateModel (line 1314)
The non-seasonal moving average polynomial is non-invertible.
Error in arima/setLagOp (line 391)
Mdl = validateModel(Mdl);
Error in arima/estimate (line 1183)
Mdl = setLagOp(Mdl, 'MA' , LagOp([1 coefficients(iMA)' ], 'Lags', [0 LagsMA ]));
Error in ARMA_model (line 9)
[fit,~,logL] = estimate(mod,y,'print',false);
does it means that this signal is non stationary?what is a problem related to my code?please help me