Using gret l for Principles of Econometrics, 4th Edition

Using the Dialogs

Return to the main gretl window and choose Model>Ordinary least squares. This will bring up the ‘specify model’ dialog box. Choose g as the dependent variable as shown.

Since your data are defined as time-series (recall, you did this through Data>Dataset structure) an extra button, labeled ‘lags...’, appears at the bottom of the dialog. Click the ‘lags...’ button in the specify model dialog box and the ‘lag order’ dialog box shown on the right-hand side in Figure

9.7 opens.

Click OK and the 3 lagged values of GDP growth are added to the model. Now, click OK in the specify model dialog and the model is estimated.

Now, we’ll use the dialogs to extend the sample and generate the forecasts. From the model window choose Analysis>Forecasts. This opens the ‘Add observations’ dialog box shown in Figure 9.15. To add three observations change the number in the box to 3. Click OK to open the forecast dialog box shown below in Figure 9.16.

By choosing to add 3 observations to the sample, the forecast range is automatically set to 2009:4 to 2010.2. Notice that we’ve chosen ’automatic forecast (dynamic out of sample).’ Click OK and the forecast results appear.

A script is actually much simpler. Here is the example in a script.

open "@gretldirdatapoeokun. gdt"

2 ols g(0 to -2) const

3 dataset addobs 3

4 fcast 2009:4 2010:2 —plot=c:tempar2plot. plt

In line 3 the dataset addobs tells gretl to add 3 observations to the dataset. Then, the fcast command with the desired dates to forecast are given. The results are:

For 95% confidence intervals, t(93, 0.025) = 1.986

Obs

g prediction

std. error

95% interval

2009:4

0.718079

0.552688

-0.379448 -

1.81561

2010:1

0.933435

0.590660

-0.239499 -

2.10637

2010:2

0.994452

0.628452

-0.253530 -

2.24243

Miraculously, these match those in POE4! Gretl can optionally use gnuplot to plot the time-series and the forecasts (with intervals). The plot is shown in Figure 9.17.[71] The last three observations are forecasts (in blue) and include the 95% confidence intervals shown in green. Actual inflation appears in red. From an economics standpoint, the forecast is depressing, mainly because the intervals are very wide. The 95% interval includes a possible recession.

Добавить комментарий

Using gret l for Principles of Econometrics, 4th Edition

Simulation

In appendix 10F of POE4, the authors conduct a Monte Carlo experiment comparing the performance of OLS and TSLS. The basic simulation is based on the model y = x …

Hausman Test

The Hausman test probes the consistency of the random effects estimator. The null hypothesis is that these estimates are consistent-that is, that the requirement of orthogonality of the model’s errors …

Time-Varying Volatility and ARCH Models: Introduction to Financial Econometrics

In this chapter we’ll estimate several models in which the variance of the dependent variable changes over time. These are broadly referred to as ARCH (autoregressive conditional heteroskedas - ticity) …

Как с нами связаться:

Украина:
г.Александрия
тел./факс +38 05235  77193 Бухгалтерия
+38 050 512 11 94 — гл. инженер-менеджер (продажи всего оборудования)

+38 050 457 13 30 — Рашид - продажи новинок
e-mail: msd@msd.com.ua
Схема проезда к производственному офису:
Схема проезда к МСД

Партнеры МСД

Контакты для заказов шлакоблочного оборудования:

+38 096 992 9559 Инна (вайбер, вацап, телеграм)
Эл. почта: inna@msd.com.ua