Using gret l for Principles of Econometrics, 4th Edition

Wheat Yield

Figure 4.15 plots the average wheat yield in Greenough Shire over time (in tonnes per hectare- we’re in OZ!) using the data in wa-wheat. gdt. The results from the example in section 4.4 of your textbook is easily produced in gretl. Start by loading the data and estimating the effect of time, time on yield greenough using least squares. The following script will load the data file, estimate the model using least squares, and generate a graph of the actual and fitted values of yield (greenough) from the model.

The resulting plot appears below in Figure 4.15. The fitted line can be added. Right-clicking on

image111

Figure 4.15: The plot of the actual yield in Greenough Shire over time

the graph brings up a menu of choices. Choose Edit and the plot controls dialog box appears as shown in Figure 4.16. There is a pull-down menu in the box called fitted line from which you can choose to fit a line, a quadratic, or a cubic equation. I chose line and the result appears in the figure. From the lines tab a few of the defaults; the legend for the series is changed to Actual Yield and the line style was changed to line/points. The X-axis tab was used to change the axis label to ‘Year.’

The simple gnuplot command works well enough. However, I took advantage of having declared the dataset structure to be time-series to improve the look. I also added a description and label to be used in the graph using the - d and - n switches for setinfo. The commands are

1 setinfo greenough - d "Wheat yield in tonnes" - n "Yield in tonnes"

2 gnuplot greenough —with-lines —time-series —linear-fit

There are three options listed after the plot. The first (—with-lines) tells gnuplot to connect the points using lines. The second option (—time-series) tells gnuplot that the graph is of time - series. In this case, the dataset’s defined time variable will be used to locate each point’s position on the X-axis. The final option plots the least squares fit of a line. To make the graph look like Figure 4.15 some further manipulation was done using the plot controls.

To explore the behavior of yield further, create a new variable using the series command from t3 = time311,000,000 as shown below. This rescaling of time cubed merely changes the scale of the coefficient by a corresponding amount and has no effect on the shape or fit of the model. It

image112

Figure 4.16: The graph dialog box can be used to change characteristics of your graphs. Use the Main tab to give the graph a new name and colors; use the X - and Y-axes tabs to refine the behavior of the axes and to provide better descriptions of the variables graphed.

is particularly useful for long time-series since cubing large integers may exceed your computer's capacity to yield accurate results (i. e., numerical overflow). The new plot appears in Figure 4.17.

1 series t3=time"3/1000000

2 ols greenough const t3

3 gnuplot greenough —with-lines —time-series

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

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 457 13 30 — Рашид - продажи новинок
e-mail: msd@msd.com.ua
Схема проезда к производственному офису:
Схема проезда к МСД

Партнеры МСД

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

Внимание! На этом сайте большинство материалов - техническая литература в помощь предпринимателю. Так же большинство производственного оборудования сегодня не актуально. Уточнить можно по почте: Эл. почта: msd@msd.com.ua

+38 050 512 1194 Александр
- телефон для консультаций и заказов спец.оборудования, дробилок, уловителей, дражираторов, гереторных насосов и инженерных решений.