Estimate ARIMAX Model Using Econometric Modeler App
This example shows how to specify and estimate an ARIMAX model using the Econometric Modeler app. The data set, which is stored inData_CreditDefaults.mat
, contains annual investment-grade corporate bond default rates, among other predictors, from 1984 through 2004. Consider modeling corporate bond default rates as a linear, dynamic function of the other time series in the data set.
Import Data into Econometric Modeler
At the command line, load theData_CreditDefaults.mat
data set.
loadData_CreditDefaults
For more details on the data set, enterDescription
at the command line.
Convert the tableDataTable
to a timetable:
Clear the row names of
DataTable
.Convert the sampling years to a
datetime
vector.Convert the table to a timetable by associating the rows with the sampling times in
dates
.
DataTable.Properties.RowNames = {}; dates = datetime(dates,12,31,'Format','yyyy'); DataTable = table2timetable(DataTable,'RowTimes',dates);
At the command line, open theEconometric Modeler应用程序。
econometricModeler
Alternatively, open the app from the apps gallery (seeEconometric Modeler)。
ImportDataTable
into the app:
On theEconometric Modelertab, in theImportsection, click.
In theImport Datadialog box, in theImport?column, select the check box for the
DataTable
variable.ClickImport.
The variables, includingIGD
, appear in theTime Seriespane, and a time series plot containing all the series appears in theTime Series Plot(AGE)figure window.
Assess Stationarity of Dependent Variable
In theTime Seriespane, double-clickIGD
. The value ofIGD
appears in thePreviewpane, and a time series plot forIGD
appears in theTime Series Plot(IGD)figure window.
IGD
appears to be stationary.
Assess whetherIGD
has a unit root by conducting a Phillips-Perron test:
On theEconometric Modelertab, in theTestssection, clickNew Test>Phillips-Perron Test.
On the页tab, in theParameterssection, setNumber of Lagsto
1
.In theTestssection, clickRun Test.
The test results in theResultstable of the页(IGD)document.
The test rejects the null hypothesis thatIGD
contains a unit root.
Inspect Correlation and Collinearity Among Variables
Plot the pairwise correlations between variables.
Select all variables in theTime Seriespane by clicking
AGE
, then pressShiftand clickSPR
.Click thePlotstab, then clickCorrelations.
A correlations plot appears in theCorrelations(AGE)figure window.
All predictors appear weakly associated withIGD
. You can test whether the correlation coefficients are significant by usingcorrplot
at the command line.
Assess whether any variables are collinear by performing Belsley collinearity diagnostics:
In theTime Seriespane, select all variables.
Click theEconometric Modelertab. Then, in theTestssection, clickNew Test>Belsley Collinearity Diagnostics.
Tabular results appear in theCollinearity(AGE)document.
None of the condition indices are greater than the condition-index tolerance (30
)。因此,没有表现出明显的变量multicollinearity.
Specify and Estimate ARIMAX Model
Consider an ARIMAX(0,0,1) model forIGD
containing all predictors. Specify and estimate the model.
In theTime Seriespane, click
IGD
.Click theEconometric Modelertab. Then, in theModelssection, click the arrow to display the models gallery.
In the models gallery, in theARMA/ARIMA Modelssection, clickARIMAX.
In theARIMAX Model Parametersdialog box, on theLag Ordertab, setMoving Average Orderto
1
.In thePredictorssection, select theInclude?check box for each time series.
ClickEstimate. The model variable
ARIMAX_IGD
appears in theModelspane, its value appears in thePreviewpane, and its estimation summary appears in theModel Summary(ARIMAX_IGD)document.
At a 0.10 significance level, all predictors and the MA coefficient are significant.
Close all figure windows and documents.
Check Goodness of Fit
Check that the residuals are normally distributed and uncorrelated by plotting a histogram, quantile-quantile plot, and ACF of the residuals.
In theModelspane, select
ARIMAX_IGD
.On theEconometric Modelertab, in theDiagnosticssection, clickResidual Diagnostics>Residual Histogram.
ClickResidual Diagnostics>Residual Q-Q Plot.
ClickResidual Diagnostics>Autocorrelation Function.
In the right pane, drag theHistogram(ARIMAX_IGD)andQQPlot(ARIMAX_IGD)图窗口,这样他们占领上两个问uadrants, and drag the ACF so that it occupies the lower two quadrants.
The residual histogram and quantile-quantile plots suggest that the residuals might not be normally distributed. According to the ACF plot, the residuals do not exhibit serial correlation. Standard inferences rely on the normality of the residuals. To remedy nonnormality, you can try transforming the response, then estimating the model using the transformed response.