# 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  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 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