www.gusucode.com > econ 案例源码程序 matlab代码 > econ/SpecifyMoreLagsForPACFPlotExample.m

    %% Specify More Lags for the PACF Plot
% Specify the multiplicative seasonal ARMA $(2,0,1)\times(3,0,0)_{12}$ model:
%
% $$(1-0.75L-0.15L^2)(1-0.9L^{12}+0.75L^{24}-0.5L^{36})y_t = 2+\varepsilon_t-0.5\varepsilon_{t-1},$$
%
% where $\varepsilon_t$ is Gaussian with mean 0 and variance 1.

% Copyright 2015 The MathWorks, Inc.

Mdl = arima('AR',{0.75,0.15},'SAR',{0.9,-0.75,0.5},...
    'SARLags',[12,24,36],'MA',-0.5,'Constant',2,...
    'Variance',1);
%%
% Simulate data from |Mdl|.
rng(1);
y = simulate(Mdl,1000);
%%
% Plot the default partial autocorrelation function (PACF).
figure
parcorr(y)
%%
% The default correlogram does not display the dependence structure for
% higher lags.
%%
% Plot the PACF for 40 lags.
figure
parcorr(y,40)
%%
% The correlogram shows the larger correlations at lags 12, 24, and 36.