Am 21.11.2020 um 15:26 schrieb Allin Cottrell:
On Fri, 20 Nov 2020, Sven Schreiber wrote:
>
> It seems to come from VAR_allocate_cholesky_matrix in lib/src/var.c,
> where we have:
>
> n = var->neqns * effective_order(var);
> var->C = gretl_zero_matrix_new(n, var->neqns);
>
> So the number of rows is indeed chosen as dim x lagorder which explains
> my row number 4 above - but this doesn't make any sense, does it?
That C matrix is described in var.h as "augmented Cholesky-decomposed
error matrix". I can't say I remember the exact reason for augmenting it
with zeros, but as things stand it's required for conformability in
functions such as gretl_VAR_get_fcast_decomp(). Just making C square
would definitely break things, though there may be a smarter approach
that doesn't need the augmentation. (At a quick peek, this might require
replacement of a straight matrix addition with addition of a small
matrix to a region of a larger one.)
Even if we decide using the augmented C is more efficient for internal
usage, we could trim it when writing to the $system bundle.
Right, I think that would be the natural way. Another thing for after
release.
thanks
sven