Dear Nicolas,

I am attempting some testing of adequacy in the post estimation of my STAR model. Specifically I'm attempting to test for the presence of no autocorrelation using the methods of Eitrheim and Terasvirta (1996). This is a Serial Correlation LM test which is Chi-squared distributed. However, I'm obtaining a negative LM test statistic. I'm thinking this simply means that the auxillary regression is clearly a worse fit than the estimated STAR model under the assumption of no autocorrelation. But I'm unsure because Chi-squared distributions are non-negative.

Summary of methods from Eitrheim and Terasvirta:

The test can be performed in three stages as follows.

(i) Estimate the STAR model by NLS under the assumption of uncorrelated errors and compute the residual sum of squares SSRo.

(ii) Estimate the auxillary equation and compute the residual sum of squares, SSR.

(iii) Compute the test statistic LM = {(SSRo- SSR)/q}/{SSR/(T- n- q)}, where n is the dimension of the gradient vector z.

Code: Select all

`equation restricted.LS LRD6=C(1)+C(2)*LRD6(-1)+C(3)*ETHMRGN+C(4)*DLCORN+C(5)*LRD4+(C(6)+C(7)*LRD6(-1)+C(8)*ETHMRGN+C(9)*DLCORN+C(10)*LRD4)/(1+@EXP(-C(11)*(LRVO(-1)-C(12))/0.185725335183854))`

series residsaved = resid_star_d6

restricted.@se

scalar ssr_res = restricted.@ssr

equation unres.LS resid_star_d6=C(1)+C(2)*LRD6(-1)+C(3)*ETHMRGN+C(4)*DLCORN+C(5)*LRD4+resid_star_d6(-1)+(C(6)+C(7)*LRD6(-1)+C(8)*ETHMRGN+C(9)*DLCORN+C(10)*LRD4+resid_star_d6(-1))/(1+@EXP(-C(11)*(LRVO(-1)-C(12))/0.185725335183854))+((1+@EXP(+405.766955136*(LRVO(-1)+0.374340794197)))^-2)*@EXP(+405.766955136*(LRVO(-1)+0.374340794197)) *(LRVO(-1)+0.374340794197)*(0.127293152902*LRD6(-1)+0.0457404726499*ETHMRGN-0.21312195182*DLCORN+0.492432175743*LRD4+(4.46766838498+11.5817705242*LRD6(-1)+6.99153891012*ETHMRGN+27.7593920141*DLCORN+8.49206117726*LRD4))+(-405.766955136)*((1+@EXP(+405.766955136*(LRVO(-1)+0.374340794197)))^-2)*@EXP(+405.766955136*(LRVO(-1)+0.374340794197)) *(LRVO(-1)+0.374340794197)*(0.127293152902*LRD6(-1)+0.0457404726499*ETHMRGN-0.21312195182*DLCORN+0.492432175743*LRD4+(4.46766838498+11.5817705242*LRD6(-1)+6.99153891012*ETHMRGN+27.7593920141*DLCORN+8.49206117726*LRD4))

scalar ssr_unres = unres.@ssr

scalar q = 1 'order of autocorrelation tested for

scalar ssr_diff = (ssr_res-ssr_unres)/q

scalar n =4 'dimension of gradients

scalar t = 269 'number of observations included in restricted estimation

scalar lm_test_stat = ssr_diff*(ssr_unres/(t-n-q))

lm_test_stat = -0.006877

Should this negative LM statistic give me concern? Or should I simply view it as very strong evidence of no autocorrelation?