On Mon, 2 Jul 2018, Sven Schreiber wrote:
Am 02.07.2018 um 19:00 schrieb Andreas Zervas:
> I am attaching a test script. For case 3 it works, but not for case 4, and
> as Sven said, nor for case 2.
>
Ok, thanks. If there are no further complications, I think I should be able
to deal with this tomorrow.
Quick diagnosis: In cases 2 and 4 the function SVAR_coint is exiting
early on error, because jbeta has 5 rows and the function thinks it
ought to have 6. So on exit the "SVARobj" has not been filled with
the required matrices. Then when we get to the function vecm_est,
jbeta is 0 x 0 and the attempt to extract a non-null submatrix
necessarily fails ("Index value 1 is out of bounds").
I've taken the liberty of making SVAR_coint fail with an error
message (in git) if jbeta is deemed not to be of the correct
dimensions. Of course feel free to revert that, but it seems some
more error-reporting is needed.
Allin