ETF2100/5910: Introductory Econometrics
Introductory Econometrics
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
ETF2100/5910: Introductory Econometrics
Solution of Week 10 Tutorial
Consider the following food expenditure model
food expi = β1 + β2incomei + ei (1)
using the data in food.csv, which contains 40 observations. We hypothesize that there is
a problem of heteroskedasticity of the form
var[ei | incomei] = σ2i = σ2 · incomei. (2)
Questions:
a. Estimate the model (1), report the results, and plot the residuals against income.
Solution:
Figure 1: Regression Result of the Model (1)
Step 1
Result
1
Thus, the estimated model is
̂food expi = 83.42 + 10.21 · incomei, (3)
(43.41) (2.09)
where the numbers in parentheses are the corresponding standard errors.
Figure 2: Plotting Residuals against Income
Step 1
One should run regression first to ensure the residuals (i.e.s “resid” of Eviews) have valid
numbers for later use.
Step 2
Step 3
Result
The residuals are plotted against income, and it looks like the variation of the residual
is not a constant but depends on income. Larger variance comes with higher income.
2
It is worth mentioning that we made this conclusion by screening without conducting
a formal hypothesis test, so the conclusion could be wrong.
b. Conduct a White test by performing the test step by step, and verify your answer
by using the inbuilt option in EViews.
Solution:
Model the variance function as
var[ei] = α1 + α2incomei + α3income
2
i + vi. (4)
If the variance of ei moves systematically with income, we should find that at least
one of α2 and α3 is not zero.
Since var[ei] is unknown in practice, we use ê
2
i instead, in which
êi = food expi − b1 − b2incomei
with b1 and b2 being the OLS estimates of β1 and β2 respectively.
We can use either the F -test or the χ2-test. Let’s use the χ2 test in the following
calculation to be consistent with the lecture notes. The details of the F -test are the
same as what we have done in the previous tutorials, so omitted.
3
The details of the χ2-test are follows.
H0 : α2 = α3 = 0 v.s. H1 : at least one of α2 and α3 6= 0 is not zero.
The test statistic is χ2stat = N · R2 ∼ χ2df, in which N is the number of observations
(40 in this case), and df = 2 since only two coefficients are tested. Using the 5% sig-
nificance level, we have χ2(0.95,2) = 5.99 (using Eviews command “@qchisq(0.95,2)”).
To calculate the statistic value we implement the following Eviews operations.
Figure 3: Regression Result of the Model (1)
Step 1
One should run regression for the mode (1) first to ensure “resid” includes valid numbers.
Result
Then χ2stat = 40 · 0.19 = 7.6, which is greater than χ2(0.95,2) = 5.99. Thus, we reject
H0, and conclude that there is heteroskedasticity in the error term.
4
An alternative way to implement the above procedure:
Alternatively, based on the regression result in Figure 1, one may implement the
following Eviews operations.
Figure 4: Implementing the White Test by the Inbuilt Option of Eviews
Step 1
Step 2
Result
Comparing the estimation results of Figure 3 and Figure 4, the regression results are
identical.
5
c. Transform the model (1) to ensure the transformed error has a constant error vari-
ance.
Solution:
The form of heteroscedasticity is assumed to be known, and it depends only on
income in the following form var[ei] = σ
2
i = σ
2 · income. To get rid of the problem,
we divide through the model (1) by
√
incomei. Then the transformed model with
constant variance is
food expi√
incomei
= β1
1√
incomei
+ β2
incomei√
incomei
+
ei√
incomei
, (5)
in which the transformed error variance is
var
[
ei√
incomei
∣∣ incomei] = var[ei | incomei]
incomei
=
σ2 · incomei
incomei
= σ2. (6)
6
d. Estimate the transformed model and report the results using equation (1).
Solution:
Figure 5: Regression Result of the Transferred Model (5)
Step 1
Result
Thus, the estimated model is
̂food expi = 78.68 + 10.45 · incomei, (7)
(23.79) (1.39)
where the numbers in parentheses are the corresponding standard errors.
Compared to the results reported in (3), the standard errors have decreased, which is
what we would generally expect.