numpar.m

来自「计量工具箱」· M 代码 · 共 48 行

M
48
字号
function r=numpar(rex);
% PURPOSE: determine the number of non-zero values of ARIMA model
% ------------------------------------------------------------
% SYNTAX: r=numpar(rex);
% ------------------------------------------------------------
% OUTPUT: r: 1x1 ---> number of elements different from f in
%         the AR and MA operators of ARIMA model
% ------------------------------------------------------------
% INPUT: rex: structure that contains the AR and MA operators
%        of ARIMA model, both regular and seasonal, as well as
%        the degrees of differencing
% ------------------------------------------------------------
% LIBRARY: conta

% written by:
% Enrique M. Quilis
% Instituto Nacional de Estadistica
% Paseo de la Castellana, 183
% 28046 - Madrid (SPAIN)

r=0;

% regular AR operator

aux=rex.ar_reg;
r = r + conta(aux,0);
clear aux;

% regular MA operator

aux=rex.ma_reg;
r = r + conta(aux,0);
clear aux;

% seasonal AR operator

aux=rex.ar_sea;
r = r + conta(aux,0);
clear aux;

% seasonal MA operator

aux=rex.ma_sea;
r = r + conta(aux,0);
clear aux;

r=r-4;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?