Send Gretl-devel mailing list submissions to
gretl-devel@lists.wfu.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.wfu.edu/mailman/listinfo/gretl-devel
or, via email, send a message with subject or body 'help' to
gretl-devel-request@lists.wfu.edu
You can reach the person managing the list at
gretl-devel-owner@lists.wfu.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gretl-devel digest..."
Today's Topics:
1. Re: basic Julia support (Riccardo (Jack) Lucchetti)
2. Really like the new editor preferences (Artur T.)
----------------------------------------------------------------------
Message: 1
Date: Tue, 19 Jan 2016 18:41:27 +0100 (CET)
From: "Riccardo (Jack) Lucchetti" <r.lucchetti@univpm.it>
To: Allin Cottrell <cottrell@wfu.edu>
Cc: Gretl development <gretl-devel@lists.wfu.edu>
Subject: Re: [Gretl-devel] basic Julia support
Message-ID: <alpine.DEB.2.20.1601191830360.21022@ec-4.econ.univpm.it>
Content-Type: text/plain; charset="iso-8859-15"; Format="flowed"
On Sat, 16 Jan 2016, Allin Cottrell wrote:
> My test was admittedly kinda silly, in that there's not really any reason to
> delegate to a "foreign" program stuff that gretl handles well natively. One
> would be more likely to get Julia to do MCMC or the like.
>
> That said, among the various "foreign" programs on which I've tried the
> notorious Longley exercise, only numpy comes close to gretl for numerical
> precision. However, Anders makes a fair point in saying that the statistical
> error (and I would add, data error) swamps the numerical error for this sort
> of linear problem.
This is problaby more akin to a real-life case:
<hansl>
matrix X = mnormal(6,6)
mwrite(X, "X.mat")
foreign language=julia
function ReadGretlMat(fname)
moo = readdlm(fname);
rows = moo[1,1];
cols = moo[1,2];
v = Array(Float64,rows,cols);
[v[i] = convert(Float64,moo'[i+cols]) for i=1:cols*rows]
return(v');
end
function WriteGretlMat(A, fname)
r,c = size(A)
v = Array(Any,(r+1)*c);
v[1] = r;
v[2] = c;
[v[i] = "" for i=3:c];
[v[i+c] = A'[i] for i=1:r*c];
writedlm(fname,reshape(v,c,r+1)');
end
X = ReadGretlMat("X.mat");
WriteGretlMat(inv(X), "invX.mat");
end foreign
iX = mread("invX.mat")
check = X * iX
print check
</hansl>
(with apologies for my poor and non-idiomatic use of Julia --- but I'll
improve, promise).
In fact, I'm beginning to thing that we ought to provide a Julia package
("GretlLink"?) on pkg.julialang.org for communication with gretl with
functions such as the above and more, ideally written by a specialist
(Andreas, are you interested?). So in practice, a "using GretlLink"
statement would be implicit every time we enter a "foreign" environment,
possibly preceded by a 'Pkg.Add("GretlLink")' if necessary.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Universit? Politecnica delle Marche
(formerly known as Universit? di Ancona)
r.lucchetti@univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
------------------------------
Message: 2
Date: Tue, 19 Jan 2016 21:36:28 +0100
From: "Artur T." <artur.tarassow@googlemail.com>
To: Gretl development <gretl-devel@lists.wfu.edu>
Subject: [Gretl-devel] Really like the new editor preferences
Message-ID: <569E9E4C.3070400@googlemail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Dear Allin and Jack,
today I found the new editor preference options such as "Enable
auto-brackets" and "Enable auto-completion", and I really like these
features!
Best,
Artur
------------------------------
_______________________________________________
Gretl-devel mailing list
Gretl-devel@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-devel
End of Gretl-devel Digest, Vol 108, Issue 17
********************************************