? P&R Exercise 10.1 options crt, limwarn=0; freq q; smpl 59:1 95:3; read(file='\tsp\prhb\datadisk\ex67.xls', format=excel) gcq gydq; consum=gcq; y=gydq; ysq=y**2; msd y; set ymean=@mean; print ymean; title 'Example 10.1 - Linear Model'; olsq consum c y; title 'Example 10.1 - Quadratic Model'; olsq consum c y ysq; title 'Marginal Propensities to Consume'; set mpc1=@coef(2)+2*@coef(3)*ymean; set mpc2=@coef(2)+2*@coef(3)*600; print mpc1 mpc2; title 'Restricted Estimation' ; frml eq1 consum=b0+b1*y**b2; param b0 1 b1 1 ; const b2 1 ; lsq eq1; set l0=@logl; set ssrr=@ssr; set rsqr=@rsq; olsq @res c y ysq ; ? for the LM test later. set lmrsq = @rsq ; title 'Unrestricted Estimation' ; param b2 ; lsq(maxit=200,step=golden) eq1; set l1=@logl; set ssru=@ssr; title 'Marginal Pronpensities to Consume'; set mpc3=b1*b2*ymean**(b2-1); set mpc4=b1*b2*600**(b2-1); print mpc3 mpc4; title 'Example 10.3'; title 'Wald Test'; frml restr b2-1; analyz restr; title 'Likelihood Ratio Test - Two Ways'; set lra=2*(l1-l0); set lrb=@nob*log(ssrr/ssru); cdf(chisq, df=1) lra; cdf(chisq, df=1) lrb; title 'Lagrange Multiplier Test'; set lm=@nob*lmrsq; cdf(chisq, df=1) lm; stop;end;