Hi all,
I've been using the modtest --autocorr option to test for autocorrelation in
a VAR model. I set the sample 1985 01 - 2009 04 (100 observations). The
automatic test and the manually specified LM test calculation do not yield
the same result because the former (automatic) uses observations (for the m
lags) outside the sample while the latter (manual) stays within
the specified sample period. I am of the opinion that the latter is more
accurate because the sample is restricted for a priori reasons that would be
invalid in the automatic autocorrelation testing option. Thoughts?
Here's the output from the script:
*AUTOMATIC: *
Breusch-Godfrey test for autocorrelation up to order 4
OLS, using observations 1985:1-2009:4 (T = 100)
Dependent variable: uhat
coefficient std. error t-ratio p-value
-------------------------------------------------------------
const -0.00580334 0.320830 -0.01809 0.9856
time -4.86302e-07 0.000692273 -0.0007025 0.9994
l_USGDP_1 -0.348853 0.657432 -0.5306 0.5970
l_USGDP_2 0.627695 0.609177 1.030 0.3057
l_USGDP_3 -0.123856 0.568652 -0.2178 0.8281
l_USGDP_4 -0.154690 0.333191 -0.4643 0.6436
l_COMP_1 0.00101458 0.0120923 0.08390 0.9333
l_COMP_2 -0.00117663 0.0211498 -0.05563 0.9558
l_COMP_3 -0.0101049 0.0314406 -0.3214 0.7487
l_COMP_4 0.0113482 0.0192114 0.5907 0.5563
uhat_1 0.377927 0.669859 0.5642 0.5741
uhat_2 -0.255529 0.496828 -0.5143 0.6083
uhat_3 -0.127548 0.238803 -0.5341 0.5946
uhat_4 -0.0859906 0.212572 -0.4045 0.6868
Unadjusted R-squared = 0.027148
Test statistic: LMF = 0.599973,
with p-value = P(F(4,86) > 0.599973) = 0.664
*Alternative statistic: TR^2 = 2.714813,*
*with p-value = P(Chi-square(4) > 2.71481) = 0.607*
Ljung-Box Q' = 0.955537,
with p-value = P(Chi-square(4) > 0.955537) = 0.916
*MANUAL*
Model 2: OLS, using observations 1986:1-2009:4 (T = 96)
Dependent variable: uhatUSGDP
coefficient std. error t-ratio p-value
-------------------------------------------------------------
const -0.0211644 0.397158 -0.05329 0.9576
uhatUSGDP_1 0.338611 0.910909 0.3717 0.7111
uhatUSGDP_2 -0.261190 0.584142 -0.4471 0.6560
uhatUSGDP_3 -0.149634 0.245107 -0.6105 0.5432
uhatUSGDP_4 -0.0877872 0.221146 -0.3970 0.6924
time -3.10909e-05 0.000855037 -0.03636 0.9711
l_USGDP_1 -0.309372 0.900280 -0.3436 0.7320
l_USGDP_2 0.580976 0.772587 0.7520 0.4542
l_USGDP_3 -0.107547 0.720912 -0.1492 0.8818
l_USGDP_4 -0.159781 0.485321 -0.3292 0.7428
l_COMP_1 0.00192274 0.0123714 0.1554 0.8769
l_COMP_2 -0.00188331 0.0216852 -0.08685 0.9310
l_COMP_3 -0.0100372 0.0391818 -0.2562 0.7985
l_COMP_4 0.0116237 0.0259833 0.4474 0.6558
Mean dependent var -0.000048 S.D. dependent var 0.004580
Sum squared resid 0.001943 S.E. of regression 0.004868
R-squared 0.024783 Adjusted R-squared -0.129825
F(13, 82) 0.160296 P-value(F) 0.999620
Log-likelihood 382.5531 Akaike criterion -737.1062
Schwarz criterion -701.2053 Hannan-Quinn -722.5945
rho -0.001343 Durbin-Watson 1.998754
Excluding the constant, p-value was highest for variable 52 (time)
Generated scalar T = 96
Generated scalar R = 0.024783
Generated scalar LM = 2.37917
Chi-square(4): area to the right of 2.37917 = 0.666394
(to the left: 0.333606)
Thanks!
Mj