/* AUTOCORRELATED DISTURBANCES AND THE CONSUMPTION FUNCTION */ /* Load Data and Define Variables */ load path = c:\gauss8.0\classes\econ5350\data\; load x[37,3] = macro.txt; t = x[2:37,1]; y = x[2:37,2]; c = x[2:37,3]; nobs = rows(t); constant = ones(nobs,1); xmat = constant~t~y; /* OLS Estimation */ b = inv(xmat'*xmat)*(xmat'*c); resids = c - xmat*b; /* Time Series Plot of Residuals */ library pgraph; graphset; title("Consumption Function Residuals -- U.S. Data 1950-1985"); xlabel("Time"); ylabel("Residuals"); xy(t,resids);