arima中 aic和bic的使用

https://blog.csdn.net/qq_34861102/article/details/77659399

https://wenku.baidu.com/view/c7ce4e41777f5acfa1c7aa00b52acfc789eb9fb9.html

https://www.pianshen.com/article/2557329197/

k=0;
  for i = 0:3
    for j = 0:3 %0:L,L的值不确定 
        if i == 0 & j == 0
            continue
        elseif i == 0
            ToEstMd = arima('MALags',1:j,'Constant',0); %指定模型的结构
        elseif j == 0
            ToEstMd = arima('ARLags',1:i,'Constant',0); %指定模型的结构
        else
            ToEstMd = arima('ARLags',1:i,'MALags',1:j,'Constant',0); %指定模型的结构
        end
        k = k + 1;
        R(k) = i;
        M(k) = j;
        [EstMd,EstParamCov,LogL,info] = estimate(ToEstMd,da);
        %模型拟合,估计模型参数
        numParams = sum(any(EstParamCov));
        %计算拟合参数的个数
        [aic(k),bic(k)] = aicbic(LogL,numParams,n);
    end
end
fprintf('R,M,AIC,BIC的对应值如下\n%f');%显示计算结果
check  = [R',M',aic',bic'];
posted @ 2020-04-23 23:30  LY-CS  阅读(1049)  评论(0编辑  收藏  举报