Category Using gret l for Principles of Econometrics, 4th Edition


Similarly, gretl can be used to produce predictions. The predicted food expenditure of an average household having weekly income of $2000 is:

foodTexpt = 83.42 + 10.21incomet = 83.42 + 10.21(20) = 287.61 (2.5)

Remember, income is measured in $100, so 20 in the above expression represents 20*$100=$2,000. The gretl script is:

scalar yhat = $coeff(const) + $coeff(income)*20

which yields the desired result.

Read More

T-Tests, Critical Values, and p-values

In section 3.4 the GUI was used to obtain test statistics, critical values and p-values. However, it is often much easier to use the the genr or scalar commands from either the console or as a script to compute these. In this section, the scripts will be used to test various hypotheses about the sales model for Big Andy.

Significance Tests

Multiple regression models includes several independent variables because one believes that each as an independent effect on the mean of the dependent variable. To confirm this belief it is customary to perform tests of individual parameter significance. If the parameter is zero, then the variable does not belong in the model...

Read More

Finite Distributed Lags

Finite distributed lag models contain independent variables and their lags as regressors.

Vi = a + воXt + ві%і-1 + в2Xt-2 + … PqXt-q + Є (9.1)

for t = q + 1,… ,T. The particular example considered here is an examination of Okun’s Law. In this model the change in the unemployment rate from one period to the next depends on the rate of growth of output in the economy.

ut – ut-i = – y(gt – gw) (9.2)

where ut is the unemployment rate, gt is GDP growth, and gw is the normal rate of GDP growth. The regression model is

Aut = a + во gt + et (9.3)

where A is the difference operator, a = yGn, and во = — Y. An error term has been added to the model. The difference operator, Au = ut — ut-1 for all = 2,3,…, T...

Read More

Prediction, Goodness-of-Fit, and Modeling Issues

Several extensions of the simple linear regression model are now considered. First, conditional predictions are generated using results saved by gretl. Then, a commonly used measure of the quality of the linear fit provided by the regression is discussed. We then take a brief detour to discuss how gretl can be used to provide professional looking output that can be used in your research.

The choice of functional form for a linear regression is important and the RESET test of the adequacy of your choice is examined. Finally, the residuals are tested for normality. Normality of the model’s errors is a useful property in that, when it exists, it improves the the performance of least squares and the related tests and confidence intervals we’ve considered when sample sizes are small (finite)...

Read More

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

Read More