Some Basic Gretl Skills: Make A Table
Some Basic Gretl Skills: Make A Table
Cottrell
Make an X-Y graph To create an X-Y scatter graph, rst select two variables in gretls main window (using Ctrl if they are non-contiguous). Then right-click and select XY scatterplot. Or click the graph icon (third from the right on the toolbar at the foot of gretls main window). A dialog box will appear in which you select the variable to be shown on the X axis. With the graph displayed, click on the graph window for a pop-up menu. This menu gives the option of copying the graph to the clipboard (from where you can paste it into Word), saving the graph in various formats, editing the graph, and so on. If you want to ne-tune the appearance of the graph, explore the possibilities that appear when you click Edit in the pop-up menu. Labeling points in a graph: If the data le contains identifying labels for the observations (as the OECD data les do), you have various options in relation to displaying those labels. With the graph on-screen, individual labels appear when you brush the data points with the mouse. To get rid of these, select Clear data labels from the pop-up menu. To x them in place (so they carry over when you copy-and-paste the graph), select Freeze data labels. If you want to add data labels for every point, select Edit from the graph pop-up and check the box titled Show all data labels. (This may or may not produce good results, since the labels may overlap.) Further graphing options are available if you go to the Data menu on the menubar in the gretl main window (the options Graph specied vars and Multiple scatterplots). Also worth mentioning are two quite different sorts of graph which give you a x on the distribution of a single selected variable: a frequency plot or histogram and a boxplot. These are both available via the right-click pop-up menu in gretls main window when just one variable is selected. Equation of line of best t When you create a X-Y graph, if there is a reasonable degree of linear t then a line of best t is shown, and its equation is displayed at the top-left corner of the graph. To get details on this, click for the graph pop-up and select OLS estimates. (OLS = Ordinary Least Squares, which is the most common method for nding the best linear t.) The OLS output can also be copied into Word, if you wish.