www.gusucode.com > econ 案例源码程序 matlab代码 > econ/GJRModelwithNonconsecutiveLagsExample.m
%% Specify GJR Model with Nonconsecutive Lags % This example shows how to specify a GJR model with nonzero coefficients % at nonconsecutive lags. % Copyright 2015 The MathWorks, Inc. %% % Specify a GJR(3,1) model with nonzero GARCH terms at lags 1 and 3. Include % a mean offset. Mdl = gjr('Offset',NaN,'GARCHLags',[1,3],'ARCHLags',1,... 'LeverageLags',1) %% % The unknown nonzero GARCH coefficients correspond to lagged variances % at lags 1 and 3. The output shows only the nonzero coefficients. %% % Display the value of |GARCH|: Mdl.GARCH %% % The |GARCH| cell array returns three elements. The first and third elements % have value |NaN|, indicating these coefficients are nonzero and need to % be estimated or otherwise specified. By default, |gjr| sets the interim % coefficient at lag 2 equal to zero to maintain consistency with MATLAB(R) % cell array indexing.