Choosing a Functional Form
There is no reason to think that the relationship between food-exp and income is a linear one. In fact, it is likely to be nonlinear. A low wage earner might spend nearly all of an additional dollar on food whereas a high income earner might spend very little. The linear model above implies that rich and poor spend the same amount of an additional dollar of income. As seen in the previous chapters, nonlinearities can be modeled by transforming the dependent or independent variable. This complicates interpretation a bit, but some simple differential calculus can quickly sort things out.
Linear regression is considerably more flexible than its name implies. There are many relationships in economics that are known to be nonlinear. The relationship between production inputs and output is governed in the short-run by the law of diminishing returns, suggesting that a convex curve is a more appropriate function to use. Fortunately, a simple transformation of the variables (x, y, or both) can yield a model that is linear in the parameters (but not necessarily in the variables).
The important point to remember is, the functional form that you choose should be consistent with how the data are actually being generated. If you choose an inappropriate form, then your estimated model may at best not be very useful and at worst be downright misleading.
In gretl you are given some very useful commands for transforming variables. From the main gretl window the Add pull-down menu gives you access to a number of transformations; selecting one of these here will automatically add the transformed variable to your data set as well as its description.
Figure 4.7 shows the available selections from this pull-down menu. In the upper part of the panel two options appear in black, the others are greyed out because they are only available is you have defined the dataset structure to consist of time-series observations. The available options can be used to add the natural logarithm or the squared values of any highlighted variable to your data set. If neither of these options suits you, then the next to last option Define new variable can be selected. This dialog uses the scalar command and the large number of built in functions to transform variables in different ways. Just a few of the possibilities include square roots (sqrt),
sine (sin), cosine (cos), absolute value (abs), exponential (exp), minimum (min), maximum (max), and so on. Later in the book, we’ll discuss changing the dataset’s structure to enable some of the other variable transformation options.