Is there a possibility to forced a loop even if we have a error message?
In fact i created a loop to test different lag specifications for MS-TVTP model. And for each lag i compute a Ljung-box test for my residuals (the test is inside the loop). The problem is that for some specification, the LB test doesn't run (because of problem of concvergence, my series of residuals display for each date "NA"...it is not the problem) and the loop stop.
I have this message:
Code: Select all
Ljung-box statistics - order 1
The Error Occurred At Location 267, Line 21 of LB
Called From Location 3742, Line 265 of loop/block
## REG7. Variance is Zero
## REG7. Variance is Zero
The Error Occurred At Location 267, Line 21 of LB
Called From Location 3742, Line 265 of loop/block
Regards