Using gret l for Principles of Econometrics, 4th Edition
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 that you estimate the overall variance of the model’s errors, a2. Gretl does not explicitly report the estimator, a2, but rather, its square root, a. Gretl calls this “S. E. of regression” which you can see from the output is 89.517. Thus, 89.5172 = 8013.29. Gretl also reports the sum of squared residuals, equal to 304505.2, from which you can calculate the estimate. Dividing the sum of squared residuals by the estimator’s degrees of freedom yields a2 = 304505/38 = 8013.29.
The estimated variances and covariance of the least squares estimator can be obtained once the model is estimated by least squares by selecting the Analysis>Coefficient covariance matrix command from the pull-down menu of the model window as shown in Figure 2.13. The result is:
Covariance matrix of regression coefficients:
const income
1884.44 -85.9032 const
4.38175 income
So, estimated variances of the least squares estimator of the intercept and slope are 1884.44 and 4.38175, respectively. The least squares standard errors are simply the square roots of these numbers. The estimated covariance between the slope and intercept -85.9032.
You can also obtain the variance-covariance matrix by specifying the --vcv option when estimating a regression model. For the food expenditure example use:
ols food_exp const income --vcv