* Heteroscedasticity and Autocorrelation Problem set nocc set nocolor file 11 b:interest.dat read(11) tbill ip m infl sample 1 125 * Dealing with autocorrelation ols tbill ip m infl/rstat resid=r arima r/plotac plotpac auto tbill ip m infl/rstat * Dealing with heteroscedasticity ?ols tbill ip m infl/resid=rr diagnos/het genr rr2=rr**2 genr lrr2=log(rr2) genr lip=log(ip) ols lrr2 lip * Note that the slope coefficient is approximately 4 genr ip4=ip**4 genr w=1/ip4 ols tbill ip m infl/rstat weight=w * Doing it "manually" genr ip2=ip**2 genr ntbill=tbill/ip2 genr nip=ip/ip2 genr nm=m/ip2 genr ninfl=infl/ip2 genr nconst=1/ip2 ols ntbill nip nm ninfl nconst/noconstant rstat diagnos/het * Note especially the ARCH test says we have not * corrected the problem auto ntbill nip nm ninfl nconst/noconstant rstat * Try attacking ARCH directly genr r2=r**2 genr lr2=lag(r2) sample 2 125 ols r2 lr2 * The R-square from the above equation times n is * distributed as a Chi-square, one d.f. genr h=.11+.53*lr2 genr srh=sqrt(h) genr rh=1/h ols tbill ip m infl/weight=rh * Doing it "manually genr mtbill=tbill/srh genr mip=ip/srh genr mm=m/srh genr minfl=infl/srh genr mconst=1/srh ols mtbill mip mm minfl mconst/rstat noconstant diagnos/het auto mtbill mip mm minfl mconst/rstat noconstant