%% ARIMA Error Model Without an Intercept
% This example shows how to specify a regression model with ARIMA errors without a regression intercept.
% Specify the default regression model with ARIMA(3,1,2) errors:
% \begin{array}{c}{y_t} = {X_t}\beta  + {u_t}\\\left( {1 - {a_1}L - {a_2}{L^2} - {a_3}{L^3}} \right)\left( {1 - L} \right){u_t} = \left( {1 + {b_1}L + {b_2}{L^2}} \right){\varepsilon _t}.\end{array}

Mdl = regARIMA('ARLags',1:3,'MALags',1:2,'D',1,'Intercept',0)

% The software sets Intercept to 0, but all other parameters in Mdl are NaN values by default.
% Since Intercept is not a NaN, it is an equality constraint during estimation. In other words, if you pass Mdl and data into estimate, then estimate sets Intercept to 0 during estimation.
% In general, if you want to use estimate to estimate a regression models with ARIMA errors where D > 0 or s > 0, then you must set Intercept to a value before estimation.
% You can modify the properties of Mdl using dot notation.
% Copyright 2015 The MathWorks, Inc.