* * Example 12.5 from page 278 * open data tablef2-2[1].txt calendar 1960 data(format=prn,org=columns) 1960:1 1995:1 year g pg y pnc puc ppt pd pn ps pop * set loggpop = log(g/pop) set logypop = log(y) set logpg = log(pg) set logpnc = log(pnc) set logpuc = log(puc) set trend = year set predummy = t<=1973:1 set postdummy = t>=1974:1 * * AR1 (restricted model) * ar1(method=hilu) loggpop # constant logypop logpg logpnc logpuc compute rssr=%rss * * Unrestricted model - include current and one lag of each explanatory variable, * and the lag of the dependent variable. * linreg loggpop # constant loggpop{1} logypop{0 1} logpg{0 1} logpnc{0 1} logpuc{0 1} * * There are four degrees of freedom for the test. The AR1 estimates five * regressors + rho, while the full dynamic model estimates two lags on the four x * variables, plus constant and the lagged dependent. * compute fstat=(rssr-%rss)/(4*%seesq) cdf(title="Test of Common Factors") ftest fstat 4 %ndf