Graph the Data

To generate a graph of the food expenditure data that resembles the one in Figure 2.6 of POE,

you can use the 1= button on the gretl toolbar (third button from the right). Clicking this button brings up a dialog to plot the two variables against one another. Figure 2.4 shows this dialog where x is placed on the x-axis and y on the y-axis. The result appears in Figure 2.5. Notice that the labels applied above now appear on the axes of the graph.


Figure 2.5: XY plot of the food expenditure data

Figure 2.5 plots food expenditures on the y axis and Weekly Income on the x. Gretl, by default, also plots the fitted regression line. The benefits of assigning labels to the variables becomes more obvious. Both X – and Y-axes are informatively labeled and the graph title is changed as well. More on this later.


lools Data

View Add Sample Variable

Model HelD

food. gdt

w Ordinary Least Squares…)

ID# *

Variable name < Descriptive label

Instrumental variables



auto-generated constant

Other linear models



household food expenditure

Nonlinear models



weekly household income |

Time series

Figure 2.6: From the menu bar, select Model>Ordinary Least Squares to open the least squares dialog box


Figure 2.7: The Specify Model dialog box opens when you select Model>Ordinary least squares

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>