(* PS5.1, using DATA4-3, to verify Example 5.1 and Table 5.1 *)
ols housing 0 intrate pop gnp 
(* compute absolute percentage error *)
genr ape3 = 100*abs(uhat)/housing
(* compute mean percentage error *)
genr mape3 = mean(ape3)
(* Model B *)
omit pop
genr ape2 = 100*abs(uhat)/housing
genr mape2 = mean(ape2)
(* Model A *)
ols housing 0 intrate pop
genr ape1 = 100*abs(uhat)/housing
genr mape1 = mean(ape1)
(* Correlation coefficients *)
corr gnp pop intrate 
print mape1 mape2 mape3
(* carry out joint F-test for coefficients of pop and gnp *)
ols housing 0 intrate pop gnp 
omit pop gnp 

