%% Specify a Regression Model with SARIMA Errors
% Specify the following model:
% \begin{array}{*{20}{l}}
% \begin{array}{c}
% {y_t} = 1 + 6{X_t} + {u_t}\\
% (1 - 0.2L)(1 - L)(1 - 0.5{L^4} - 0.2{L^8})(1 - {L^4}){u_t} = (1 + 0.1L)(1 + 0.05{L^4} + 0.01{L^8}){\varepsilon _t},
% \end{array}
% \end{array}
% where \varepsilon_{t} is Gaussian with variance 1.

Mdl = regARIMA('Intercept',1,'Beta',6,'AR',0.2,...
    'MA',0.1,'SAR',{0.5,0.2},'SARLags',[4, 8],...
    'SMA',{0.05,0.01},'SMALags',[4 8],'D',1,...
    'Seasonality',4,'Variance',1)

%
% If you do not specify SARLags or SMALags, then the coefficients in SAR and SMA correspond to lags 1 and 2 by default.

Mdl = regARIMA('Intercept',1,'Beta',6,'AR',0.2,...
    'MA',0.1,'SAR',{0.5,0.2},'SMA',{0.05,0.01},...
    'D',1,'Seasonality',4,'Variance',1)

% Copyright 2015 The MathWorks, Inc.