* * Example 6.3.2 on pp 197-198 * open data oshorts.dat data(format=free,org=columns) 1 57 overs * boxjenk(ma=1,maxl,demean) overs compute unrlogl=%logl * disp "Davis-Dunsmuir test" %beta(1) "vs .05 critical value" -1.0+6.80/%nobs * * To do the likelihood ratio version of the test, we need to evaluate the * likelihood at the hypothesized value (theta=-1). This is done by using * METHOD=EVAL (which evaluates, rather than estimating) and feeding in the value * with the INITIAL option. * boxjenk(ma=1,maxl,demean,initial=||-1.0||,method=eval) overs compute rlogl=%logl disp "LR version of test" -2.0*(rlogl-unrlogl)