* * Example UKUSIND.DAT from pp 427-430 * open data ukusind.dat calendar(m) 1970 data(format=free,org=columns) 1970:1 1992:7 date usind ukind * set logus = log(usind) set loguk = log(ukind) * graph(footer="Figure 10-15 Logarithms of U.K. and U.S. stock indexes") 2 # logus # loguk * linreg loguk # constant logus{0 1} * graph(footer="Figure 10-16 Residuals of ln UK=f(ln US) using OLS") # %resids * ar1(method=corc) loguk # constant logus{0 1} * graph(footer="Figure 10-17 Homoscedastic residuals for log relationship") # %resids * * Goldfeld-Quandt test on the levels. * ar1(method=corc) ukind * 107 # constant usind{0} compute ess1=%rss,ndf1=%ndf ar1(method=corc) ukind 165 * # constant usind{0} compute ess2=%rss,ndf2=%ndf cdf(title="Goldfeld-Quandt Test") ftest (ess2/ndf2)/(ess1/ndf1) ndf2 ndf1 * * Goldfeld-Quandt test of the logs * ar1(method=corc) loguk * 107 # constant logus{0} compute ess1=%rss,ndf1=%ndf ar1(method=corc) loguk 165 * # constant logus{0} compute ess2=%rss,ndf2=%ndf cdf(title="Goldfeld-Quandt Test") ftest (ess2/ndf2)/(ess1/ndf1) ndf2 ndf1