假设我们遵循模型
其中epsilon是白噪声,我尝试了以下代码
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
但是当我运行以下命令时
[aic_matric,bic_matrix]=ARMA_model(B,100);
我得到了结果
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);
这是否意味着该信号是非平稳的?与我的代码有关的问题是什么?请帮助我