%% Create ARIMAX Model Using Name-Value Pairs
% This example shows how to specify an ARIMAX model using arima.
% Specify the ARIMAX(1,1,0) model that includes three predictors:
% (1 - 0.1L){(1 - L)^1}{y_t} = x_t^\prime {\left[ {\begin{array}{*{20}{c}}3&{ - 2}&5\end{array}} \right]^\prime } + {\varepsilon _t}.

Mdl = arima('AR',0.1,'D',1,'Beta',[3 -2 5])

% The output shows that the ARIMAX model Mdl has the following qualities:
% Property P in the output is the sum of the autoregressive lags and the degree of integration, i.e., P = p + D = 2.
% Beta contains three coefficients corresponding to the effect that the predictors have on the response. Mdl does not store predictor or response data. You specify the required data when you operate on Mdl.
% The rest of the properties are 0, NaN, or empty cells.
% Be aware that if you specify nonzero D or Seasonality, then Econometrics Toolbox™ differences the response series y_t before the predictors enter the model. Therefore, the predictors enter a stationary model with respect to the response series y_t. You should preprocess the predictors x_t by testing for stationarity and differencing if any are unit root nonstationary. If any nonstationary predictor enters the model, then the false negative rate for significance tests of \beta can increase.
% Copyright 2015 The MathWorks, Inc.