matlab多变量的arimax模型,Estimate ARIMAX Model Using Econometric Modeler App

Import Data into Econometric Modeler

At the command line, load the Data_CreditDefaults.mat data set.

load Data_CreditDefaults

For more details on the data set, enter Description at the command line.

Convert the table DataTable 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 the Econometric Modeler app.

econometricModeler

Alternatively, open the app from the apps gallery (see

Import DataTable into the app:

On the Econometric Modeler tab, in the

Import section, click 6ab4e74f94ca41f387811df3dcc33d68.png.

In the Import Data dialog box, in the

Import? column, select the check box for the

DataTable variable.

Click Import.

The variables, including IGD, appear in the Time Series pane, and a time series plot containing all the series appears in the Time Series Plot(AGE) figure window.

Assess Stationarity of Dependent Variable

In the Time Series pane, double-click IGD. The value of IGD appears in the Preview pane, and a time series plot for IGD appears in the Time Series Plot(IGD) figure window.

612a105f2e732239a32da06ce76ec27c.png

IGD appears to be stationary.

Assess whether IGD has a unit root by conducting a Phillips-Perron test:

On the Econometric Modeler tab, in the Tests section, click New Test > Phillips-Perron Test.

On the PP tab, in the Parameters section, set Number of Lags to 1.

In the Tests section, click Run Test.

The test results in the Results table of the PP(IGD) document.

b19bac30842db6fffb725e62b07e85f7.png

The test rejects the null hypothesis that IGD contains a unit root.

Inspect Correlation and Collinearity Among Variables

Plot the pairwise correlations between variables.

Select all variables in the Time Series pane by clicking AGE, then press Shift and click SPR.

Click the Plots tab, then click Correlations.

A correlations plot appears in the Correlations(AGE) figure window.

793ea624700640a39aa03e845382ef4a.png

All predictors appear weakly associated with IGD. You can test whether the correlation coefficients are significant by using corrplot at the command line.

Assess whether any variables are collinear by performing Belsley collinearity diagnostics:

In the Time Series pane, select all variables.

Click the Econometric Modeler tab. Then, in the Tests section, click New Test > Belsley Collinearity Diagnostics.

Tabular results appear in the Collinearity(AGE) document.

b62639b4e6eafb6b6d0b14f2bdfbcf9f.png

None of the condition indices are greater than the condition-index tolerance (30). Therefore, the variables do not exhibit multicollinearity.

Specify and Estimate ARIMAX Model

Consider an ARIMAX(0,0,1) model for IGD containing all predictors. Specify and estimate the model.

In the Time Series pane, click IGD.

Click the Econometric Modeler tab. Then, in the Models section, click the arrow to display the models gallery.

In the models gallery, in the ARMA/ARIMA Models section, click ARIMAX.

In the ARIMAX Model Parameters dialog box, on the Lag Order tab, set Moving Average Order to 1.

In the Predictors section, select the Include? check box for each time series.

9306b9f6259e2f88dcaef9e76e3104e4.png

Click Estimate. The model variable ARIMAX_IGD appears in the Models pane, its value appears in the Preview pane, and its estimation summary appears in the Model Summary(ARIMAX_IGD) document.

e9f84b54ddfe582281ef85a6c109f523.png

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 the Models pane, select ARIMAX_IGD.

On the Econometric Modeler tab, in the Diagnostics section, click Residual Diagnostics

> Residual Histogram.

Click Residual Diagnostics >

Residual Q-Q Plot.

Click Residual Diagnostics >

Autocorrelation Function.

In the right pane, drag the Histogram(ARIMAX_IGD) and QQPlot(ARIMAX_IGD) figure windows so that they occupy the upper two quadrants, and drag the ACF so that it occupies the lower two quadrants.

47810820e717b61f2e4e5a710fc11b13.png

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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值