* Multicollinearity in the Longley Data
*
* Keywords:
* regression, ols, multicollinearity, longley
*
* Description:
* We illustrate the problems which Multicollinearity can bring by using
* Longley dataset (notorious for severe multicollinearity) and estimating
* the same model on datasets different only in one observation
*
* Author(s):
* Noel Roy
* Skif Pankov
*
* Source:
* William H. Greene, Econometric Analysis - 7th Edition
* Pearson International Edition, Chapter 4, Example 4.11 (page 130)
*
* Setting the first time period to be equal to year 1947 with periodicity of
* one year
time 1947 1
sample 1947.0 1962.0
* Reading the datafile and naming the variables, specifying to ignore the
* first line of the file
read (TableF4-2.shd) employ gnpdef gnp armedfor year / skiplines=1
* Running OLS regressions of employ on year, gnpdef, gnp and armedfor,
* specifying to use the dataset up to the observation from 1961 (exclude the
* last, 16th observation) in the first regression
ols employ year gnpdef gnp armedfor / END=1961.0
ols employ year gnpdef gnp armedfor
* Printing the correlation matrix of variables
?stat employ year gnpdef gnp armedfor / pcor
* Printing the r**2 statistics for the auxiliary regressions of each independent
* variable on all other independent variables. Variance inflation = 1/(1-r**2)
?ols employ year gnpdef gnp armedfor / auxrsqr
stop