Using gret l for Principles of Econometrics, 4th Edition

Nonsample Information

In this section we’ll estimate a beer demand model. The data are in beer. gdt and are in level form. The model to be estimated is

ln(q) = ві + в2 ln(pb) + вз ln(pl) + в4 ln(pr) + вб ln(i) + e (6.6)

The first thing to do is to convert each of the variables into natural logs. Gretl has a built in function for this that is very slick. From the main window, highlight the variables you want to

image200
image201

transform with the cursor. Then go to Add>Logs of selected variables from the pull-down menu as shown in Figure 6.11. This can also be done is a script or from the console using the

Highlight the desired variables
using the mouse.

Figure 6.11: Use the pull-down menu to add the natural logs of each variable

image202

command logs q pb pl pr i. The natural log of each of the variables is obtained and the result stored in a new variable with the prefix l_ (“el” underscore). An even easier way to add the logs is to highlight the variables and right-click the mouse. A pop-up menu appears and the Add logs option is available.

A no money illusion restriction can be parameterized in this model as + вз + в4 + вб = 0. This is easily estimated within gretl using the restrict dialog or a script as shown below.

1 open "@gretldirdatapoebeer. gdt"

2 logs q pb pl pr i

3 ols l_q const l_pb l_pl l_pr l_i —quiet

4 restrict

5 b2+b3+b4+b5=0

6 end restrict

Restriction:

b[l_pb] + b[l_pl] + b[l_pr] + b[l_i] = 0

Test statistic: F(1, 25) = 2.49693, with p-value = 0.126639 Restricted estimates:

Restricted estimates:

coefficient

std. error

t-ratio

p-value

const

-4.79780

3.71390

-1.292

0.2078

l_pb

-1.29939

0.165738

-7.840

2.58e-08

***

l_pl

0.186816

0.284383

0.6569

0.5170

l_pr

0.166742

0.0770752

2.163

0.0399

**

l_i

0.945829

0.427047

2.215

0.0357

**

Standard error of the regression = 0.0616756

Figure 6.12: gretl output for the beer demand

The syntax for the restrictions is new. Instead of using b[2]+b[3]+b[4]+b[5]=0, a simpler form is used. This is undocumented in the gretl version I am using (1.9.5cvs) and I am uncertain of whether this will continue to work. It does for now and I’ve shown it here. Apparently gretl is able to correctly parse the variable number from the variable name without relying on the brackets. The output from the gretl script output window appears in Figure 6.12.

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

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