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
5 years, 11 months
Couple issues I encountered with Gretl
by Guy Krug
Hi there,
Couple things I noticed in using Gretl on my Mac.
First is it localized to Japanese for some reason on install. I was able to
poke around and change it to English. My system is in English and so not
sure why it didn't read that correctly.
Second I noticed that there was recently code added (07/23) to handle
quotations on importing CSVs. I have a CSV with names in it and some names
have quotations (like O'Brien). For now I can delete that column but
perhaps worth adding an option to ignore quotations.
Thanks,
Guy Krug
6 years, 11 months
WG: append horizontal and vertical
by Schaff, Frederik
Dear all,
I am trying to load a bunch of data into gretl, with a structure similar to the attached files (time 1600), i.e. I have horizontal and vertical appending at the same time. I basically use a script that opens the first file (like parameters_1.tsv) and then via a loop appends all the other files. However, the horizontal appending works only for the first files (belonging to *_1.tsv) and even there not completely, afterwards a single entry is done for each file, with "missing" values. There is a common key in the first column, so I thought the "update-overlap" option should work (after the first record is complete (all 9 files above appended) and the first "item" of each record is added (see script attached). It does not, however....
PS: the "--quiet" option is not present in the tool-tip of "append".
A WE is given with the script and the 18 files (first 2 records of my simulation experiment). The operation should lead to two records, but it ends up with 11... Take a look at the common key "ABMAT_ConfigID" to see what I mean with one glance, after you imported the data.
Any idea what I am missing?
Best Frederik
6 years, 11 months
winsor function moved to package extra.gfn
by Sven Schreiber
Hi,
the 'winsor' function to perform winsorization (a kind of trimming) on
series has been transplanted from the winsor.gfn package to the updated
version of the extra.gfn package.
('extra' is a growing collection of individual smaller functions that
are useful mainly for scripting, but also for general use.)
Therefore I will remove the winsor.gfn package from the package server.
Thanks a lot to Jason He / JoshuaHe for contributing the original winsor
package!
To use the transplanted function it should be enough to do something
like this (after an 'install extra.gfn' if it isn't there already):
include extra.gfn
series y_winsorized = winsor(y)
... for an existing y series.
As always, if something doesn't work, we welcome bug reports or
questions here or on the sourceforge tracker (sourceforge.net/p/gretl/bugs).
Thanks,
Sven
6 years, 12 months
yahoo_get package to be removed soon
by Sven Schreiber
Hi,
as has been discussed on this list, the yahoo_get function package
--which was a "Downloader of daily financial data from Yahoo"-- no
longer works as intended, due to permanent server-side changes at Yahoo.
Therefore that package will be removed soon from the function package
repository, i.e. will not be downloadable from within gretl anymore. If
for some reason the package is still useful for you (don't know why, but
hey...) you should make a personal backup copy of it (that is, of the
file yahoo_get.gfn).
Note that the helper function gap_filler() from yahoo_get.gfn has been
transplanted to the new package extra.gfn which was just published
today. No need to keep yahoo_get around just for that, instead you would
just do 'include extra.gfn'.
thanks,
sven
7 years
Changing the link to the R folder when compiling gretl
by Artur T.
Dear all,
I just compiled R myself on my ubuntu 17.04 machine in order to be able
to use the --enable-R-shlib option. The flags I used when compiling R are:
./configure --enable-R-shlib --with-blas --with-lapack
However, after freshly compiling gretl using latest git, I obtain an
error that "make" cannot find the „gretl_foreign.lo“ since "make" looks
into the wrong folder („/usr/share/R/"; which is the correct folder when
installing R from the ubuntu reps.) but it should look into
„/usr/local/share/R/" instead (where it is installed now using my own
compilation). Unfortunately, I could not find a flag telling gretl to
change the folder where to look for „gretl_foreign.lo“.
Does anybody know how to change this accordingly?
Best,
Artur
7 years
Looking for Uriel, author of MCO_Ridge
by Sven Schreiber
Hi,
does anybody here know (or _is_) Uriel Rodríguez Ramírez, the author of
the package MCO_Ridge.gfn? The email given in the package
(urieleconometria(a)hotmail.com) might not work anymore, since Microsoft
has stopped providing hotmail services AFAIK.
Thanks for any information
Sven
7 years