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

    %% Specify ARIMAX Model Using Name-Value Pairs  
% This example shows how to specify an ARIMAX model using |arima|.    

% Copyright 2015 The MathWorks, Inc.


%% 
% 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}.$$
%
model = arima('AR',0.1,'D',1,'Beta',[3 -2 5]) 

%%
% The output shows that the ARIMAX model, |model|, 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.  

%%
% * The rest of the properties are 0, |NaN|, or empty cells.   

%%
% Be aware that if you specify nonzero |D| or |Seasonality|, then
% Econometrics Toolbox(TM) 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.