USE "Z:\mydocs\ys209\divorce.syd" mglh model divmf = constant + unemp + flfprt + marumf + brtw1544 + milperk save divres01/data estimate use divres01 plot residual*year/line dash=11 stick=out plot residual*year/line dash=11 stick=out ylimit=0 npar runs residual/cut=0 rem this is Wald-Wolfowitz non-parametric test of autocorrelation rem Cochrane-Orcutt procedure with r=0.826 basic let ldiv=lag(divmf) let lune=lag(unemp) let lflf=lag(flfprt) let lmar=lag(marumf) let lbir=lag(brtw1544) let lmil=lag(milperk) let pdiv=divmf-0.826(ldiv) let pdiv=divmf-0.826*ldiv let pune=unemp-0.826*lune let pflf=flfprt-0.826*lflf let pmar=marumf-0.826*lmar let pbir=brtw1544-0.826*lbir let pmil=milperk-0.826*lmil run list year divmf ldiv pdiv/n=10 mglh model pdiv=constant+pune+pflf+pmar+pbir+pmil save divres02/data estimate use divres02 rem at this point check significance of D-W statistic rem if significant one could iterate Cochrane-Orcutt procedure rem now use Hildreth-Lu procedure in nonlin module nonlin model divmf=rho*ldiv+b0+bu*(unemp-rho*lune)+bf*(flfprt-rho*lflf)+bm*(marumf-rho*lmar), +bb*(brtw1544-rho*lbir)+bi*(milperk-rho*lmil) estimate mglh