defbundle parsing
by Sven S
Hi,
the following line works, but shouldn't it fail due to the trailing comma?:
bundle b = defbundle("a",1 ,)
thanks
sven
3 years, 10 months
clearing / unloading all user-defined functions?
by Sven Schreiber
Hi,
I wonder if it could make sense to amend the 'clear' command with an
option that would also unload all user-defined functions from memory and
the active session?
Related question: Is there currently a way other than restarting gretl
to achieve that? (I know how to unload functions from a package manually.)
thanks
sven
3 years, 10 months
$xtxinv available after restricted VECM or not?
by Sven Schreiber
Hi,
the function reference says that after restricting the alphas in a VECM
you don't get $xtxinv, and I can see the reason why (I think).
However, this seems to work:
<hansl>
open denmark
vecm 4 1 LRM LRY IBO
restrict
a[1] = 0
b[1] = 1
end restrict --full
eval $coeff
eval $stderr
eval $xtxinv
</hansl>
Bug or feature?
thanks
sven
3 years, 10 months
rename small "extra" dir in git?
by Sven Schreiber
Hi,
would it be possible to rename the "extra" top-level directory in the
git repo? It's just a couple of KB and given the existence of
addons/extra I find it a little confusing. AFAICS it contains examples
how to interact with (lib)gretl at the C level, so perhaps it could be
named "APIexamples" or "interact" or something like that.
thanks
sven
3 years, 11 months
Defining bundle by new syntax "_()"
by Artur Tarassow
Hi,
I stumbled over the following behavior when trying to define a bundle
using the new syntax _() introduced with gretl 2020e:
<hansl>
scalar V1 = 0.5
scalar V2 = -0.2
bundle B = _(V1, V2) # works well
print B
bundle C = _(V1) # fails when only single item is added
bundle D = _(V2) # fails
</hansl>
Ok, the doc says "The second variant is designed for the case where you
wish to pack several pre-existing named objects into a bundle..."
Why is _() supposed to work only with "several pre-existing named objects"?
Thanks,
Artur
3 years, 11 months
off-by-one bug in $system.t1 (and .t2) after var
by Sven Schreiber
Hi,
somehow I want to believe that we discussed this before, but I can't
find any reference to it and in any case I see the behavior in the
Nov-14th snapshot.
Consider this:
<hansl>
open denmark
var 2 LRM LRY --quiet # starts at 1974:3
eval $system.t1 # 2
eval obsnum(1974:3) # 3 (correct)
</hansl>
And the same with $system.t2. But note that this only happens after
'var', not after 'system'!
I've looked at the VAR_set_sample function in lib/src/var.c but saw no
obvious bug there - but also I don't even know whether at the C level
the v->t1 index is interpreted as 0-based or 1-based.
Some loosely related observations on C code chunks that I looked at
right now:
- We have this VAR_set_sample function and in lib/src/system.c there is
a system_adjust_t1t2 function which basically seems to have the same aim
(and internally calls list_adjust_sample from somewhere). Maybe some
consolidation in the medium term might be reasonable.
- In the equation_system_estimate function (also in lib/src/system.c)
there is this part (lines 1604-6):
if (err) {
goto system_bailout;
}
and then after another block there is (lines 1621...):
system_bailout:
if (!err) {
sys->smpl_t1 = dset->t1;
sys->smpl_t2 = dset->t2;
if (!(sys->flags & SYSTEM_LIML1)) {
set_as_last_model(sys, GRETL_OBJ_SYS);
}
}
return err;
Now I'm not too familiar with goto in C (wasn't goto declared taboo in
the old days?) but to me this looks as if first err must be non-zero to
jump but then there's the opposite check for a zero err. So isn't the
whole goto thing superfluous here and in the end just err is returned
(if non-zero), or what am I missing?
thanks
sven
3 years, 11 months
retire the ridge package?
by Sven Schreiber
Hi,
now that the regls addon is shipped with gretl and also covers the ridge
estimator, I wonder (as a package author) what we should do with the
ridge.gfn (or is it zip?) package.
- AFAICS currently the main advantage of the package is that it runs
with older gretl versions. (I haven't checked explicitly but I guess
regls requires a very recent gretl version?) We could update its help
text with a sentence like "we recommend to use regls unless your gretl
version is older than xxxx", and then keep it around for a while.
- Is there anything else which is in ridge but is missing in regls?
thanks
sven
3 years, 12 months
why non-square $system.C after var?
by Sven Schreiber
Hi,
I'm noticing that the plain cholesky-based C matrix which is stored
after 'var' estimation in $system.C is not square. For example
estimating a 2-dim VAR with 2 lags I get a 4x2 matrix there; however the
bottom half is just zero, and the top is equal to cholesky($sigma) alright.
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?
(Internally it doesn't seem to do any harm since the bottom is then not
used apparently. But it surfaces in the $system bundle as a weird thing.)
Maybe after release we could experiment with just dropping the lower
half and see if it still works...
thanks
sven
3 years, 12 months
gretl 2020e released
by Allin Cottrell
Apologies to anyone receiving multiple copies of this message, but
the gretl 2020e release is now available at
http://gretl.sourceforge.net/
It offers the following list of new features and fixes:
2020-11-21 version 2020e
- New function tdisagg() for temporal disaggregation
(distribution and interpolation)
- New addon package "regls": supports LASSO, Ridge regression
and Elastic net
- New function assert() for debugging purposes
- MPI: update documentation and support transfer of more
data types
- kdensity() function: generalize to allow as argument a
list or matrix with more than one column
- "dataset sortby": handle sorting by string-valued series
- OLS output: don't print out DW statistic when calculation of
Durbin's h fails
- Fix: when extracting a column of a "dated" matrix, copy
across the dates information
- Documentation: add material on forecasting for VARs and
other multi-equation systems
- Improve format of panel plot when there are many unnamed
individuals
- gretlcli and gretlmpi on MS Windows: accept unicode filenames
on the command line
- "midasreg" command: be more flexible in parsing arguments to
mds() terms
- Add to practice scripts: simulation using Klein model
- Implement the '^' operator (logical product) for string-
valued series
- xlsx data importer: handle correctly the case where a given
column is "partially" string-valued
- dbnomics data importer: handle absence of dimensions_labels
in some cases
- mpiscatter() function: revise rule for dividing matrices
for greater efficiency
- Fix bug: possibility of invalid XML when saving a model to
session file
- Fix bug: "smpl" command rejects the combination of "full"
and --quiet
- Fix: --single-yaxis option not respected by "gnuplot" and
"plot" when a band is specified
- Fix: GUI dialog for "join" was not working on Windows
- Fix: work around bug in Apple's LAPACK that could lead to
a crash when computing eigenvalues
- Fix: the Preview button in print dialogs was not working
in macOS build
- Fix: prune correctly the regressor list in the "perfect
prediction" case in RE probit
- Fix: incorrect $vcv matrix for bivariate probit models
- Fix: dbnomics import misaligning data of different
frequencies in certain cases
- Fix: $obsmajor and friends not working for daily data
with non-trading days omitted and dates given in the old
form of YYYY/MM/DD; also "dataset pad-daily" not working
with such old-style dates
- Fix: potential crash on closing a maximized window on
recent macOS (a GDK problem)
- MS Windows build: support printing scripts with syntax
highlighting
- MS Windows build (64-bit): update pixman, cairo and pango
libraries (DLLs)
- MS Windows build: update libeay.dll so as to prevent
crashes on certain CPUs
- MS Windows: give up on trying to write downloaded PDFs
and function packages to "system" location -- go straight
to the user's filespace
- Update packaged fedstl database
- Update several translations
--
Allin Cottrell
Department of Economics
Wake Forest University
3 years, 12 months