On Thu, 6 Jan 2022, Sven Schreiber wrote:
Am 06.01.2022 um 18:06 schrieb Allin Cottrell:
> On Thu, 6 Jan 2022, Sven Schreiber wrote:
> > Would the fix also cover the other issue that jack mentioned, that
> > $system.coeff is wrong?
> After looking further into this, my diagnosis is that var->B (which
> provides $system.coeff) has been too small (too few rows) whenever
> alpha is restricted: the EC coefficients have been dropped altogether.
Could you give a hint where in the code that can be seen? I'm
asking
because as I wrote previously I got lost.
Look at vecm_estimate_full() and vecm_check_size() in
plugin/johansen.c. Before my last push to git we were allocating
var->B with rows equal to the number of coefficients to be estimated
via OLS conditional on beta, which does not include the EC terms when
alpha is restricted. Now I allocate var->B to full size, "shrink" it
for OLS, then re-expand it to insert the ML alpha.
[...]
But where does gretl get the VAR representation from if not from
VAR_coeff_matrix_from_VECM ? (Which is where the failing check was.)
VAR_coeff_matrix_from_VECM does indeed provide the VAR representation,
using the companion matrix and the portion of var->B that refers to
deterministics and/or terms restricted to the cointegration space.
Allin