Using gret l for Principles of Econometrics, 4th Edition

Linear-Log Specification

The linear-log specification of the food expenditure model uses the natural logarithm of income as the independent variable:

food-exp = ві + в2 ln (income) + e (4.6)

Taking the logarithm of income and estimating the model

1 series l_income = ln(income)

2 ols food_exp const l_income

There is a short-cut that enables you to take the natural logs of several variables at a time. The logs function could be use do create ln(income) as

logs income

This command produces a new variable called l_income and adds it to the variables list.

Estimation of the model yields

food_exp = -97.1864 + 132.166 Lincome

(84.237) (28.805)

Подпись: T

image101

40 R2 = 0.3396 F(1, 38) = 21.053 <t = 91.567 (standard errors in parentheses)

image102

Figure 4.7: The variable pull-down menu is used to add new variables to gretl

In Figure 4.6 of POE4 the authors plot food-exp against food-exp. A positive (nonlinear) relationship between the two is expected since the the model was estimated using the natural logarithm of income. To produce this plot, estimate the regression to open the model window. Add the predicted values of from the regression to the dataset using Save>Fitted values from the model window’s pull-down menu. Name the fitted value, yhat2 and click OK. Now, return to the main window, use the mouse to highlight the three variables (food_exp, yhat2, and income),3 then select View>Graph specified vars>X-Y scatter from the pull-down menu.4 This opens the define graph dialog box. Choose yhat2 and food_exp as the Y-axis variables and income as the X-axis variable and click OK. A graph appears that looks similar to Figure 4.8

A simpler approach is to open a console or a new script window and use the following commands: To save the predicted values and plot them against the actual observations add

1 ols food_exp const l_income

2 series yhat2 = $yhat

3 gnuplot yhat2 food_exp income

The first line estimates the regression. The predicted values are held in the accessor, $yhat, and are assigned to a new variable called yhat2 using the series command. Then, call gnuplot with the predicted values, yhat2, as the first variable and the actual values of food expenditure, food_exp,

3Remember, press and hold Ctrl, then click on each variable

4You can also right-click the mouse once the variables are selected to gain access to the scatter plot. If you choose this method, gretl will prompt you to specify which of the selected variables is to be used for the X-axis.

image103

Figure 4.8: Graphing the linear-log model

as the second.

Finally, if you execute these commands using a script, the graph is written to a file on your computer rather than opened in a window. For this reason, I recommend executing these commands from the console rather than from the script file that appears at the end of this chapter.

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

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 Александр
- телефон для консультаций и заказов спец.оборудования, дробилок, уловителей, дражираторов, гереторных насосов и инженерных решений.