Function to get the powerset
by Henrique Andrade
Dear Gretl Community,
I really stuck trying to define a function that gives a power set of a
set. Suppose I have a set S:
S = {"A", "B", "C"}
The associated power set, P(S), is:
P(S) = {{ }, {"A"}, {"B"}, {"C"}, {"A", "B"}, {"A", "C"}, {"B", "C"},
{"A", "B", "C"}}
All that I can think by now (shame on me!) is this:
strings S = defarray("A", "B", "C")
scalar P_S_len = 2^nelem(S) # the size of the power set
strings P_S = array(P_S_len) # an array with 8 spaces.
Does anyone have any ideas?
Best,
Henrique Andrade
6 years, 1 month
Anybody else with menu problems on Ubuntu 18.04?
by Sven Schreiber
Hi fellow users,
since Ubuntu 18.04 was released I have started using gretl more often on
Linux again. However, I'm facing the annoying problem that quite often
the menus in the main gretl window become unresponsive in the middle of
a session. (What I mean is they don't open anymore if you click on them.)
This is likely _not_ a gretl bug but probably induced by the specifics
of the ubuntu deskop. However, Ubuntu is one of the most popular Linux
distros, and 18.04 is a long-term support (LTS) release. So I'm
wondering if this is a widespread problem.
(So far I know Artur is using Ubuntu, but not the default desktop
configuration, and he doesn't have those problems. I, on the other hand,
have installed Ubuntu with the standard and default options I believe.)
Please, quickly share your experience if you have used gretl on Ubuntu
18.04!
thanks,
sven
6 years, 2 months
gretl snapshot: GUI bug warning!
by Allin Cottrell
I just noticed fallout from the recent change (in git and snapshots)
in the way in which gretl represents missing values internally.
Importation of series from a "native" database window (e.g. our
"fedstl" database with its subset of the FRED data) got broken.
Importation by script or console command is OK, but if you import by
way of drag and drop, or the "Import" menu item or button, you'd get
weirdly distorted dates (and be unable to plot the series).
This is now fixed in git and today's snapshots.
For anyone who wants details: This problem stemmed from a bad piece of
coding on my part, going back to our old representation of missing
values. Internally, missing values are "NADBL" which was defined as
the largest floating point value, DBL_MAX. Well, I sometimes "punned"
on this by typing "NADBL" where I actually intended "the biggest
possible number". Redefine NADBL as NaN, as we have now done, and such
code will go all weird.
I found and fixed most such punning uses of "NADBL" in the process of
the switchover to NaN, but I missed one case in GUI database access.
Allin
6 years, 3 months
replacement for "install" command
by Allin Cottrell
I thought I'd broadcast a recent change in gretl git and snapshots:
the "install" command (for installing function packages) has been
replaced by a new "pkg" command. (But don't worry, the old one will
still work until further notice, though its documentation has been
dropped and it won't appear syntax-highlighted any more.)
You can get help on "pkg" in the updated command reference, but it's
quite similar to the prior syntax. The --local option behaves
exactly as before. Here are some translations:
old: install foo
new: pkg install foo
old: install foo --remove
new: pkg unload foo
old: install foo --purge
new: pkg remove foo
So you now need an "action word" (install, unload or remove) between
the command word "pkg" and the name of the target package. It also
struck me that the new "unload" and "remove" are maybe more
self-explantory that the old "remove" and "purge".
This is mostly cosmetic -- it was kinda offensive to the logical
mind to type "install foo --remove"! -- but it also puts us on track
to adding new modes for "pkg" if and when they seem useful ("query",
for example, or perhaps "list" to show all installed packages, which
wouldn't require a package name).
Allin
6 years, 3 months
R (foreign language): non-Ascii chars in gretl.loadmat on Windows
by Sven Schreiber
Hi,
I'm having problems on Windows using a file name with non-Latin
characters inside a foreign language R block, in the gretl.loadmat
function. If I stick to ASCII characters, it works. On Linux, it also works.
This is with a gretl snapshot and with R 3.5.1 (tried with 3.3.2
before), on Win 7. Don't know if there's anything gretl can do there?
thanks,
sven
6 years, 3 months
publicizing gretl's addons and packages
by Allin Cottrell
In response to some useful prodding from Sven here's an update on
gretl's web presence.
If you visit the (English-language) main gretl page (hint: hello,
webpage translators!) you'll now see, under the "Features" listing,
links to pages for the gretl addons, namely
http://gretl.sourceforge.net/addons.html
and the contributed function packages
http://ricardo.ecn.wfu.edu/gretl/cgi-bin/gretldata.cgi?opt=SHOW_FUNCS
In addition these two pages now point at each other.
The new addons page is auto-generated from the addons sources, so it
should stay up to date. It includes links to the PDF documentation
for each addon: these documents can now be found under "doc" in the
"addons" directory of the sourceforge Files area.
Allin
6 years, 3 months
speaking of Julia...
by Allin Cottrell
I recently updated to the new julia 1.0.0 and noticed that our
"foreign" I/0 support for julia was broken. To use the @printf macro
you now have to say "using Printf" first; endof() has been renamed as
lastindex(); and readdlm() requires "using DelimitedFiles". Those
points are now fixed in git, but there are other problems too.
My test script for julia interaction calls a function from the
MultivariateStats package, and that doesn't appear to be working with
julia 1.0.0. I tried using the GLM package instead but that doesn't
work either. In the first instance this was with the julia build
supplied by Arch Linux. I then tried removing that and replacing it
with the binary package of julia 1.0.0 from julialang.org: still no go
with either MultivariateStats or GLM. There seems to be some confusion
over "LinAlg" vs "LinearAlgebra" (and maybe some other things too).
Allin
6 years, 3 months
Re: [Gretl-users] New "frontier" package Gretl-users Digest, Vol 138, Issue 14
by Alecos Papadopoulos
I cannot find the "frontier.pdf" documentation. Does it become available
only when I install the package locally?
Alecos Papadopoulos
PhD Candidate
Athens University of Economics and Business, Greece
School of Economic Sciences
Department of Economics
https://alecospapadopoulos.wordpress.com/
On 23/7/2018 19:00, gretl-users-request(a)lists.wfu.edu wrote:
> and ask everybody who has an
> interest in this class of models to test the new package and tell me about
> the bugs that it contains, so I can hopefully fix it.
6 years, 3 months