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
psdroot() questions
by Sven Schreiber
Hi,
I'm using the psdroot() (generalized Choleski) for the first time
"seriously" and have some questions.
- In one case there is an eigenvalue -1.2906e-006 in the input matrix,
but psdroot still goes to work. So I guess there is no check on whether
the matrix is actually PSD?
- In another case I have an eigenvalue 3.6950e-016 (so zero apart from
machine precision). There psdroot() produces a 'nan' output for one
element and gretl spits out a warning. But since psdroot does exist
exactly for the case of zero eigenvalues (otherwise one could use
cholesky), why does that happen? Any hints/ideas?
It's not so easy to post these examples because the printed precision is
not enough to differentiate the cases.
Thanks,
sven
7 years, 2 months
tabbed foreign-script editor
by Allin Cottrell
The first novelty in gretl 2017d-git (and snapshots) is a tabbed
editor for foreign scripts (the original tabbed editor is reserved for
hansl scripts).
Also, if a foreign script produces no visible output, you now get a
warning instead of an empty "script output" window.
Allin
7 years, 2 months
$vma accessor details
by Sven Schreiber
Hi,
about the $vma (vector moving-average) accessor the user guide says (p.
235 of the A4 version):
"the $vma accessor returns an (h + 1) × n^2 matrix, in which the (i +
1)-th row is the vectorized form of Θ_i"
(and this latter \Theta_i is a VMA coeff matrix in the math equation)...
I'm wondering whether "vectorized" means by row or by column. So is
$vma[i+1, ] equal to transp(vec(Theta_i)), or equal to
transp(vec(transp(Theta_i))) ?
Thanks,
sven
7 years, 2 months
Problems compiling gretl-git
by Artur Tarassow
Dear all,
for some reason I am not able to compile gretl using git anymore. As
always, I run the following commands on my ubuntu 17.04 desktop:
<terminal>
cd git && cd gretl-git && git pull && ./configure --enable-build-doc
/terminal>
before running the "make" command (make -j4). However, make yields the
following error
<error>
./builddate
build.h is current
make -C lib
make[1]: Verzeichnis „/home/at/git/gretl-git/lib“ wird betreten
make[1]: *** Keine Regel vorhanden, um das Ziel „../lib/src/gretl_fft.h“,
benötigt von „describe.lo“, zu erstellen. Schluss.
make[1]: Verzeichnis „/home/at/git/gretl-git/lib“ wird verlassen
Makefile:65: die Regel für Ziel „lib“ scheiterte
make: *** [lib] Fehler 2
</error>
which I would translate with
<error-trans>
./builddate
build.h is current
make -C lib
make[1]: folder „/home/at/git/gretl-git/lib“ entered
make[1]: *** No rule existent to build „../lib/src/gretl_fft.h“,
required by„describe.lo“. End.
make[1]: Exit the folder „/home/at/git/gretl-git/lib“
Makefile:65: the rule „lib“ didn't work
make: *** [lib] Error 2
</error-trans>
Weirdly, I use the same set of commands to compile gretl on my ubuntu
17.04 laptop system without any error.
Any ideas what is wrong here?
Best,
Artur
7 years, 2 months
Installing -gretl- chokes on build dependencies step
by Clive Nicholas
Sven wrote:
OK, first just to be sure, you apparently want to build gretl from git
> yourself, or you don't need any of the build-dep stuff.
>
> Next, I only have an older Mint version to look at, but there is a
> system settings window called software package sources or something like
> that (sorry, I'm re-translating from German). In that window, you just
> have to tick a box (at the bottom for me) saying "activate source
> package sources" or similar. Afterwards, you reload the sources via
> apt-get update (or the GUI equivalent)
>
Jack replied:
> In fact, I think you do: the "source" repo contains all the -dev versions
> of the packages we link against (GTKSourceView, for example). The command
>
> apt-get build-dep gretl
>
> is a quick way of installing all the things that a debian-based distro
> needss to build the gretl .deb package
>
Sven replied:
> I think we're talking past each other and creating misunderstandings,
> because there is no disagreement. Perhaps I should have written
> "otherwise you wouldn't need" instead of "or you don't need".
>
> In any case, the "deb" lines posted by Clive above look very wrong to
> me, because AFAIK the download paths from sourceforge are not
> Debian/Ubuntu/Mint package repos in any way.
>
> And taking one step back, are you sure the deb-src things are really
> needed? The dev packages are needed for the build, yes, but they do not
> live in the deb-src area AFAIK. Given that the gretl sources are also
> not taken from the Debian/Mint release --instead the current sources
> from git are used-- I don't see how any source packages are needed.
>
Sorry, but isn't all this where I came in? My OP already established that
. sudo apt-get build-dep gretl
is choking on errors, and
. apt-get build-dep gretl
isn't allowed as it needs -sudo-.
Somebody please give a simple answer to a simple question: which repository
links or links are best to download and build the dependencies for -gretl-
on Linux Mint 18.2 if this is now the way we must do it, even though it
certainly wasn't before? Really, all this is _needlessly_ frustrating.
Thanks,
Clive
--
Clive Nicholas
"My colleagues in the social sciences talk a great deal about methodology.
I prefer to call it style." -- Freeman J. Dyson
7 years, 2 months