%% Display Estimation Results
% Regress the US gross domestic product (GDP) onto the US consumer price index (CPI) using a regression model with ARMA(1,1) errors, and summarize the results.
% Load the US Macroeconomic data set and preprocess the data.

load Data_USEconModel;
logGDP = log(DataTable.GDP);
dlogGDP = diff(logGDP);
dCPI = diff(DataTable.CPIAUCSL);

%
% Fit the model to the data.

Mdl = regARIMA('ARLags',1,'MALags',1);
EstMdl = estimate(Mdl,dlogGDP,'X',dCPI,'Display','off');

%
% Display the estimates.

summarize(EstMdl)

% Copyright 2012 The MathWorks, Inc.