主要内容

Estimate Regression Model with ARMA Errors Using Econometric Modeler App

此示例显示了如何使用计量经济学建模器应用程序使用ARMA错误指定和估计回归模型。数据集存储在Data_USEconModel.mat,包含每季度测量的美国个人消费支出,以及其他系列。

Consider modeling the US personal consumption expenditures (PCEC, in $ billions) as a linear function of the effective federal funds rate (FEDFUNDS), unemployment rate (不合理)和真正的国内生产总值(GDP, in $ billions with respect to the year 2000).

Import Data into Econometric Modeler

At the command line, load theData_USEconModel.matdata set.

loadData_USEconModel

Convert the federal funds and unemployment rates from percents to decimals.

DataTable.UNRATE = 0.01*DataTable.UNRATE; DataTable.FEDFUNDS = 0.01*DataTable.FEDFUNDS;

将名义GDP to real GDP by dividing all values by the GDP deflator (GDPDEF)并将结果缩放100。创建一个列DataTablefor the real GDP series.

DataTable.RealGDP = 100*DataTable.GDP./DataTable.GDPDEF;

在命令行,打开Econometric Modeler应用程序。

计量经济学

Alternatively, open the app from the apps gallery (seeEconometric Modeler).

ImportDataTable进入应用程序:

  1. On theEconometric Modeler标签,在Importsection, click

  2. 在里面Import Datadialog box, in theImport?列,选择的复选框DataTablevariable.

  3. ClickImport

全部time series variables inDataTable出现在时间序列pane, and a time series plot of the series appears in the时间序列图(COE)figure window.

绘制Series

绘制PCEC,RealGDP,FEDFUNDS, 和不合理series on separate plots.

  1. 在里面时间序列pane, double-clickPCEC

  2. 重复步骤1RealGDP,FEDFUNDS, 和不合理

  3. 在里面right pane, drag the时间序列Plot(PCEC)顶部的图形窗口使其占据前两个象限。

  4. Drag the时间序列图(RealGDP)第一个象限的图形窗口。

  5. Drag the时间序列Plot(UNRATE)第三象限的图形窗口。

ThePCECRealGDPseries appear to have an exponential trend. The不合理FEDFUNDSseries appear to have a stochastic trend.

右键单击任何图形窗口的选项卡,然后选择关闭所有关闭所有图形窗口。

评估系列之间的共线性

通过执行Belsley共线性诊断,检查该系列是否是共线。

  1. 在里面时间序列pane, selectPCEC。然后,按Ctrl然后单击以选择RealGDP,FEDFUNDS, 和不合理

  2. On theEconometric Modeler标签,在Testssection, click新测试>Belsley Collinearity Diagnostics

The Belsley collinearity diagnostics results appear in theCollinearity(FEDFUNDS)document.

全部condition indices are below the default condition-index tolerance, which is 30. The time series do not appear to be collinear.

指定和估计线性模型

Specify a linear model in whichPCEC是回应和RealGDP,FEDFUNDS, 和不合理是预测指标。

  1. 在里面时间序列pane, selectPCEC

  2. 点击Econometric Modeler标签。然后,在楷模部分,单击箭头以显示模型库。

  3. 在模型画廊中,在Regression Modelssection, clickMLR

  4. 在里面MLR Model Parametersdialog box, in the预测指标section, select the包括?复选框FEDFUNDS,RealGDP, 和不合理time series.

  5. ClickEstimate

The model variablemlr_pcecappears in the楷模pane, its value appears in the预习窗格及其估计摘要出现在Model Summary(MLR_PCEC)document.

在里面Model Summary(MLR_PCEC)图窗口,残差图表明,违反了不相关错误的标准线性模型假设。残留物似乎是自相关,非平稳性和可能异质的。

稳定变量

To stabilize the residuals, stabilize the response and predictor series by converting thePCECRealGDPprices to returns, and by applying the first difference toFEDFUNDS不合理

ConvertPCECRealGDP回报的价格:

  1. 在里面时间序列pane, select thePCEC时间序列,然后按Ctrl并选择RealGDPtime series.

  2. On theEconometric Modeler标签,在变换section, clickLog, then clickDiff

    在里面时间序列pane, variables representing the logged and differenced time series appear.

  3. 在里面时间序列pane, rename thePCECLogDiffRealGDPLogDiff。点击PCECLogDiffvariable twice to select its name and enterpcecreturns。点击RealGDPLogDiffvariable twice to select its name and enterRealgdpreturns

将第一个区别应用于FEDFUNDS不合理:

  1. 在里面时间序列pane, select theFEDFUNDS时间序列,然后按Ctrl并选择不合理time series.

  2. On theEconometric Modeler标签,在变换section, clickDifference

    在里面时间序列pane, variables representing the first difference of the time series appear.

  3. 关闭所有图形窗口和文档。

重新定义和估计线性模型

Respecify the linear model, but use the stabilized series instead.

  1. 在里面时间序列pane, selectpcecreturns

  2. On theEconometric Modeler标签,在楷模部分,单击箭头以显示模型库。

  3. 在模型画廊中,在Regression Modelssection, clickMLR

  4. 在里面MLR Model Parametersdialog box, in the预测指标section, select the包括?复选框FEDFUNDSDiff,Realgdpreturns, 和未注重的人time series.

  5. ClickEstimate

The model variableMLR_PCECRETURNSappears in the楷模pane, its value appears in the预习窗格及其估计摘要出现在模型摘要(MLR_PCECRETURNS)document.

残留图表明残留物是自相关的。

检查线性模型的拟合良好

Assess whether the residuals are normally distributed and autocorrelated by generating quantile-quantile and ACF plots.

创建一个分位数量式图MLR_PCECRETURNSmodel residuals:

  1. 在里面时间序列pane, select theMLR_PCECRETURNSmodel.

  2. On theEconometric Modeler标签,在Diagnosticssection, clickResidual Diagnostics>Residual Q-Q Plot

残差向右偏斜。

绘制残差的ACF:

  1. 在里面时间序列pane, select theMLR_PCECRETURNSmodel.

  2. On theEconometric Modeler标签,在Diagnosticssection, clickResidual Diagnostics>Autocorrelation Function

  3. On theACFtab, setNumber of Lagsto40

The plot shows autocorrelation in the first 34 lags.

用ARMA错误指定和估计回归模型

尝试通过指定ARMA(1,1)错误的回归模型来纠正残差中的自相关pcecreturns

  1. 在里面时间序列pane, selectpcecreturns

  2. 点击Econometric Modeler标签。然后,在楷模部分,单击箭头以显示模型库。

  3. 在模型画廊中,在Regression Modelssection, clickRegARMA

  4. 在里面regARMA Model Parametersdialog box:

    1. 在里面滞后订单标签:

      1. Set自回归订单to1

      2. Set移动平均订单to1

    2. 在里面预测指标section, select the包括?复选框FEDFUNDSDiff,Realgdpreturns, 和未注重的人time series.

    3. ClickEstimate

The model variableRegARMA_PCECReturnsappears in the楷模pane, its value appears in the预习窗格及其估计摘要出现在Model Summary(RegARMA_PCECReturns)document.

Thetstatistics suggest that all coefficients are significant, except for the coefficient of未注重的人。The residuals appear to fluctuate aroundy= 0无自相关。

检查ARMA错误模型的适合度

评估是否存在RegARMA_PCECReturnsmodel are normally distributed and autocorrelated by generating quantile-quantile and ACF plots.

创建一个分位数量式图RegARMA_PCECReturnsmodel residuals:

  1. 在里面楷模pane, select theRegARMA_PCECReturnsmodel.

  2. On theEconometric Modeler标签,在Diagnosticssection, clickResidual Diagnostics>Residual Q-Q Plot

The residuals appear approximately normally distributed.

绘制残差的ACF:

  1. 在里面楷模pane, select theRegARMA_PCECReturnsmodel.

  2. On theEconometric Modeler标签,在Diagnosticssection, clickResidual Diagnostics>Autocorrelation Function

The first autocorrelation lag is significant.

从这里开始,您可以估计多个模型,这些模型会因ARMA误差模型中自回归和移动平均多项式订单的数量而异。然后,选择具有最低拟合统计量的模型。或者,您可以通过将预测与样本外数据进行比较来检查模型的预测性能。

See Also

Apps

Objects

Functions

相关话题