R code
Problem Set 10
MSDA3055
Linear Regression and Time Series
Due Date: May 17, 2020
Question No. 1
Using the Data given in file EDUC, Estimate the regression, EDUC = a + b GDP + u, using the
data given in the file educ, which contains international cross-section data on aggregate
expenditure on education, EDUC, gross domestic product, GDP, and population, POP, for a
sample of 38 countries in 1997. EDUC and GDP are measured in U.S. $ million and POP is
measured in thousands.
i. Plot a scatter diagram of EDUC on GDP, and comment on whether the data set appears to be subject to heteroskedasticity.
ii. Sort the data set by GDP and perform a Goldfeld–Quandt test for heteroskedasticity, running regressions using the subsamples of 16 countries with
the smallest and greatest GDP.
iii. Perform the Breusch-Pagan Test to test the presence of heteroskedasticity in the above regression model.
iv. Perform the White test of heteroskedasticity.
Question No. 2
The file food expenditure contains data on expenditures on food and total expenditures for 100
families.
a. Regress expenditures on food on total expenditures, and examine the residuals obtained from the regression.
b. Plot the residuals obtained in part a against total expenditures and see if you observe any systematic pattern.
c. If the plot in part b suggests that there is heteroskedasticity, apply the White tests to find out if the impression of heteroskedasticity observed in part b is supported by this test.