Confidence Intervals
Confidence intervals are obtained using the scalar command in the same way as in chapter 3. A 95% confidence interval for в2, the coefficient of the price variable is generated: …
Heteroskedasticity
The simple linear regression models of chapter 2 and the multiple regression model in Chapter 5 can be generalized in other ways. For instance, there is no guarantee that the …
Linear Combination of Parameters
Since gretl stores and gives access to the estimated values of the coefficients and the variance - covariance matrix, testing hypotheses about linear combinations of parameters is very simple. Suppose …
Optimal Level of Advertising
The optimal level of advertising is that amount where the last dollar spent on advertising results in only 1 dollar of additional sales (we are assuming here that the marginal …
Time-Series Plots
Gnuplot handles all the plotting in gretl. Gretl includes some functions that help to communicate with gnuplot, which makes things much easier to do. On the other hand, if you …
Importing Data
Obtaining data in econometrics and getting it into a format that can be used by your software can be challenging. There are dozens of different pieces of software and many …
Growth Model
Below you will find a script that reproduces the results from the growth model example in section 4.5.1 of POE4. If yield grows at a constant rate of g, then …
. Estimating a Regression
The regression is also based on the University town real estate data. The regression is: price = ві + 61utown + P2sqft + 7(sqft x utown) +вз age + 62pool …
Forecasting
In this section we consider forecasting using 3 different models, an AR model, an ARDL model, and an exponential smoothing model. The examples focus on short-term forecasting, typically up to …
Prediction
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 + …
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 …
Food Expenditure Example
First, a simple model of food expenditures is estimated using least squares. The model is food-expi = в1 + в2incomei + ei i = 1,2,..., N (8.2) where food-expi is …
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 …
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) = ві + …
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 = …
Using the gretl Language
The gretl GUI is certainly easy to use. However, you can get results even faster by using gretl's language. The language can be used from the console or by collecting …
Wage Equation
Below you will find a script that reproduces the results from the wage equation example in section 4.5.2 of POE4. In this example the log-linear model is used to measure …
Applying Indicator Variables
In this section a number of examples will be given about estimation and interpretation of regressions that include indicator variables. 7.2.1 Interactions Consider the simple wage equation wage = ві …
Using the Dialogs
Return to the main gretl window and choose Model>Ordinary least squares. This will bring up the ‘specify model’ dialog box. Choose g as the dependent variable as shown. Since your …
Estimating Variance
In section 2.7 of POE4, you are given expressions for the variances of the least squares estimators of the intercept and slope as well as their covariance. These estimators require …
Polynomials
One way to allow for nonlinear relationships between independent and dependent variables is to introduce polynomials of the regressors into the model. In this example the marginal effect of an …
Lagrange Multiplier Tests
There are many tests of the null hypothesis of homoskedasticity that have been proposed elsewhere. Two of these, based on Lagrange multipliers, are particularly simple to do and useful. The …
Prediction in the Food Expenditure Model
Generating predicted values of food expenditure for a person with a given income is very simple in gretl. After estimating the model with least squares, you can use the genr …
Model Specification
There are several issues of model specification explored here. First, it is possible to omit relevant independent variables from your model. A relevant independent variable is one that affects the …
Serial Correlation
The multiple linear regression model of equation (5.1) assumes that the observations are not correlated with one another. While this is certainly believable if one has drawn a random sample, …
Scripts
Gretl commands can be collected and put into a file that can be executed at once and saved to be used again. This is accomplished by opening a new command …
Generalized R2
A generalized version of the goodness-of-fit statistic R2 can be obtained by taking the squared correlation between the actual values of the dependent variable and those predicted by the regression. …
Regional indicators
In this example a set of regional indicator variables is added to the model. There are four mutually exclusive regions to consider. A reference group must be chosen, in this …
Exponential Smoothing
Another popular model used for predicting the future value of a variable based on its history is exponential smoothing. Like forecasting with an AR model, forecasting using exponential smoothing does …
Repeated Sampling
Perhaps the best way to illustrate the sampling properties of least squares is through an experiment. In section 2.4.3 of your book you are presented with results from 10 different …
Marginal Effects
When variables interact, the marginal effect of one variable on the mean of another has to be computed manually based on calculus. Taking the partial derivative of average sales with …
Goldfeld Quandt Test for Heteroskedasticity
Using examples from Hill et al. (2011) a model of grouped heteroskedasticity is estimated and a Goldfeld-Quandt test is performed to determine whether the two sample subsets have the same …
Coefficient of Determination
One use of regression analysis is to “explain” variation in dependent variable as a function of the independent variable. A summary statistic that is used for this purpose is the …
Model Selection: Introduction to gretl Functions
Choosing an appropriate model is part art and part science. Omitting relevant variables that are correlated with regressors causes least squares to be biased and inconsistent. Including irrelevant variables reduces …
Serial Correlation in Residuals
The correlogram can also be used to check whether the assumption that model errors have zero covariance-an important assumption in the proof of the Gauss-Markov theorem. The example that illustrates …