Cars Example
The data set cars. gdt is included in package of datasets that are distributed with this manual. In most cases it is a good idea to print summary statistics of …
Nonlinear Least Squares
Perhaps the best way to estimate a linear model that is autocorrelated is using nonlinear least squares. As it turns out, the nonlinear least squares estimator only requires that the …
Retrieve the Data
The first step is to load the food expenditure and income data into gretl. The data file is included in your gretl sample files-provided that you have installed the Principles …
Linear Regression
The parameters of the model are estimated using least squares which can be done using the pulldown menus and dialog boxes (GUI) or by using gretl’s handy scripting language (affectionately …
School Fixed Effects
It may be that assignment to treatment groups is related to one or more of the observable characteristics (school size or teacher experience in this case). One way to control …
IV Estimation
Gretl handles this estimation problem with ease using what is commonly referred to as two - stage least squares. In econometrics, the terms two-stage least squares (TSLS) and instrumental variables …
Monte Carlo Experiment
Once again, the consequences of repeated sampling can be explored using a simple Monte Carlo study. In this case, we will generate 100 samples and count the number of times …
Further Inference in the Multiple Regression Model
In this chapter several extensions of the multiple linear regression model are considered. First, we test joint hypotheses about parameters in a model and then learn how to impose linear …
Heteroskedasticity in the Linear Probabilty Model
In chapter 7 we introduced the linear probability model. It was shown that the indicator variable, yi is heteroskedastic. That is, var(yi) = пі(1 - пі) (8.10) where ni is …
Installing Gretl
To install gretl on your system, you will need to download the appropriate executable file for the computer platform you are using. For Microsoft Windows users the appropriate site is …
Reporting Results
In case you think gretl is just a toy, the program includes a very capable utility that enables it to produce professional looking output. LTeX, usually pronounced “Lay-tek”, is a …
Using Indicator Variables
In this chapter we will explore the use of indicator variables in regression analysis. The discussion will include how to create them, estimate models using them, and how to interpret …
A More General Model
Equation 9.8 can be expanded and rewritten in the following way: inf = ві(1 - p) + - в2p Aut-i + p inf— + vt (9.9) inf = 5 + …
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 …
Big Andy’s Burger Barn
Hansl is used to estimate the model for Big Andy’s. The following two lines are typed into a script file, which is executed by clicking your mouse on the “gear” …
Using Linear Probability to Verify Random Assignment
A number of variables are omitted from the model and it is safe to do so as long as they are not correlated with regressors. This would be evidence of …
Two-Stage Least Squares
To perform Two-Stage Least Squares (TSLS) or Instrumental Variables (IV) estimation you need instruments that are correlated with your independent variables, but not correlated with the errors of your model. …
Hypothesis Tests
Hypothesis testing allows us to confront any prior notions we may have about the model with what we actually observe. Thus, if before drawing a sample, I believe that autonomous …
Regression Significance
To statistically determine whether the regression is actually a model of the average behavior of your dependent variable, you can use the F-statistic. In this case, H0 is the proposition …
Regression with Time-Series Data: Stationary Variables
As in chapter 9 of Principles of Econometrics, 4th edition, three ways in which dynamics can enter a regression relationship are considered-through lagged values of the explanatory variable, lagged values …
Gretl Basics
There are several different ways to work in gretl. Until you learn to use gretl’s rather simple and intuitive language syntax, the easiest way to use the program is through …
Polynomial Models
Using polynomials to capture nonlinearity in regression is quite easy and often effective. Students of economics are quite used to seeing U-shaped cost curves and S-Shaped production functions and these …
Indicator Variables
Indicator variables allow us to construct models in which some or all of the parameters of a model can change for subsets of the sample. As discussed in chapter 2, …
Autoregressive Distributed Lag Models
A model that combines finite distributed lags and is autoregressive is considered. This is the so-called autoregressive distributed lag model (ARDL). The ARDL(p, q) model has the general form yt …
Estimate the Food Expenditure Relationship
Now you are ready to use gretl to estimate the parameters of the food expenditure equation. food-expt = ві + в2incomet + et t = 1, 2,..., T (2.2) From …
Variances and Covariances of Least Squares
The variances and covariances of the least squares estimator give us information about how precise our knowledge of the parameters is from estimating them. Smaller standard errors mean that our …
Differences-in-Differences Estimation
If you want to learn about how a change in policy affects outcomes, nothing beats a randomized controlled experiment. Unfortunately, these are rare in economics because they are either very …
Script for t-values and p-values
One thing we've shown in this chapter is that many of the results obtained using the pull-down menus (often referred to as the GUI) in gretl can be obtained using …
Relationship Between t — and F-tests
You can certainly use an F-test to test the significance of individual variables in a regression. Consider once again the model for Big Andy salesi = ві + fi2price + …
Data Structures: Time Series
In order to take advantage of gretl’s many built-in functions for analyzing time-series data, one has to declare the data in the set to be a time-series. Since time-series are …
Common Conventions
In the beginning, I will illustrate the examples using a number of figures (an excessive number to be sure). These figures are screen captures of gretl’s windows as they appear …
Wheat Yield
Figure 4.15 plots the average wheat yield in Greenough Shire over time (in tonnes per hectare- we’re in OZ!) using the data in wa-wheat. gdt. The results from the example …
Creating indicator variables
It is easy to create indicator variables in gretl. Suppose that we want to create a dummy variable to indicate that a house is large. Large in this case means …
Okun’s Law
Okun’s Law provides another opportunity to search for an adequate specification of the time - series model. Load the okun. gdt data. These quarterly data begin at 1985:2. Set the …
Elasticity
Elasticity is an important concept in economics. It measures how responsiveness one variable is to changes in another. Mathematically, the concept of elasticity is fairly simple: percentage change in y …