options crt; ? 10e4 in klein; freq a; smpl 20,41; t = year-1931; w = w1+w2; smpl 21,41; ? drop observation for lagged variables ? (not required in TSP 4.3, which drops any observations with ? missing data from OLS, 2SLS, AR1, etc.) title 'Exercise 4, part (a) - OLS'; olsq cn c w p p(-1); copy @ssr ssecon; ? save for part (d) olsq i c p p(-1) klag; olsq w1 c e e(-1) t; title 'Exercise 4, part (b) - fitted values from reduced form'; list ivs c p(-1) klag e(-1) t tx g w2; olsq(silent) w ivs; wfit = @fit; olsq(silent) p ivs; pfit = @fit; olsq(silent) e ivs; efit = @fit; title 'Exercise 4, part (c) - expanded regression for consumption'; olsq cn c w p p(-1) wfit pfit; title 'Exercise 4, part (d) - Hausman exogeneity test for consumption'; set fhaus = (ssecon - @ssr)/(2*@s2); set chihaus = fhaus*2; cdf(chisq,df=2) chihaus; ? chisquare version set df2 = @nob - @ncoef; cdf(f,df1=2,df2=df2) fhaus; ? "asymptotic F" version of test ? we can also do this test (both versions) with ANALYZ frml r1 wfit; frml r2 pfit; analyz r1 r2; title 'Exercise 4, part (e) - exogeneity tests for other equations'; olsq i c p p(-1) klag pfit; ? (c), (e) same tests for other 2 equations cdf @t(5); ? asymptotic normal test olsq w1 c e e(-1) t efit; cdf @t(5); ? asymptotic normal test