* Working Computer Assignment # 6, Econ. 835, 1998 set nocolor file 11 b:data4-12.dat read(11) mort incc pov edu1 edu2 alcc tobc hexc phys urb & aged ols hexc incc pov edu1 edu2 alcc tobc mort phys urb aged & /auxrsq diagnos/het * Principal Components pc incc pov edu1 edu2 alcc tobc mort phys urb aged & /pcomp=pc pcinfo=info ols hexc pc:1 pc:2 pc:3/pcinfo=info pcomp=pc stat pc:1 pc:2 pc:3 incc pov edu1 edu2 alcc tobc mort phys & urb aged/pcor * Ridge Regression and Heteroscedasticity Test ols hexc incc edu2 urb aged/auxrsq predict=yhat resid=r diagnos/het * "Quick" ridge ols hexc incc edu2 urb aged/ridge=.2 * Ridge trace approach dim beta 5 10 k 10 set nowarn do #=1,9 genr k:#=.# ?ols hexc incc edu2 urb aged/ridge=.# coef=beta:# endo genr k:10=0 ?ols hexc incc edu2 urb aged/coef=beta:10 set warn matrix beta=beta' print k beta pause sample 1 10 plot beta:1 k plot beta:2 beta:4 k plot beta:3 k * Heteroscedasticity "correction" sample 1 51 * Determined on the basis of plots not shown that * either INCC or URB would be possible scale variables. * Dividing by (YHAT**2) in what follows, based on Park test * Park test - note coefficient is about 4 genr lyhat=log(yhat) genr lr2=log(r**2) ols lr2 lyhat genr wt=1/yhat**4 ols hexc incc edu2 urb aged/weight=wt * Doing it manually to be able to test whether it worked genr nhexc=hexc/(yhat**2) genr ryhat2=1/(yhat**2) genr nincc=incc/(yhat**2) genr nedu2=edu2/(yhat**2) genr nurb=urb/(yhat**2) genr naged=aged/(yhat**2) ols nhexc nincc nedu2 nurb naged ryhat2/noconstant diagnos/het