* * Example 8.4, page 272 * cal 1960 open data table7-9.prn data(format=prn,org=columns) 1960:1 1982:1 * set logy = log(y) set logx2 = log(x2) set logx3 = log(x3) set logx4 = log(x4) set logx5 = log(x5) linreg logy # constant logx2 logx3 logx4 logx5 * * Testing the joint restriction that the last two coefficients are zero using * EXCLUDE. * exclude # logx4 logx5 * * Same calculation done using restricted and unrestricted regressions * compute rsqu=%rsquared,ndfu=%ndf linreg logy # constant logx2 logx3 compute f=((rsqu-%rsquared)/2)/((1-rsqu)/ndfu) cdf ftest f 2 ndfu