Hi,
this message is mostly for myself, for future reference :-)
But maybe somebody else is also struggling from time to time with the
problem on how the coefficient ordering in a VECM is done in the
accessors $vecGamma and $coeff. So here's a function that does the
reordering.
Because of the "null" default for the second matrix argument and because
of the "exists" function, I think you need a fairly recent gretl version
for this.
<hansl>
function matrix vecpar2coeff(matrix Gammas, matrix alpha[null])
# translates the ordering of the $vecGamma accessor for VECMs
# to the ordering of $coeff
n = rows(Gammas)
p = cols(Gammas) / n + 1
matrix gix = seq(1,n) ** ones(1,p-1) + \
ones(1,n) ** seq(0, n*(p-2), n)
return exists(alpha) ? Gammas[,gix]' | alpha' : Gammas[,gix]'
end function
</hansl>
This is actually tested, but only in one case.
Corrections and extensions welcome,
cheers,
sven