gretl on OS X: next step
by Allin Cottrell
I've mentioned this a few times before: a build of gretl for OS X
that does not require X11/XQuartz. Now, it seems to me, is the time.
There's an experimental package (dmg) named gretl-quartz.dmg in
http://sourceforge.net/projects/gretl/files/osx-testing/
This is an all-in-one package: no need for X11, and no need for a
separate GTK framework. The dmg includes gretl 1.9.12cvs and a
Mac-native build of GTK 2.24.17 and friends.
Caveats:
(1) This is a 64-bit intel-only build for OS X 10.6 and higher.
(2) Gtk-quartz uses Apple's CoreText apparatus rather than FreeType
plus fontconfig, and the default font sizes in the two systems seem
to differ, such that the font specification appropriate to the X11
version of GTK produces a small, spindly font under quartz. Your
mileage may vary, but I have found that the following settings
(under gretl's /Tools/Preferences) produce an acceptable look:
"Menu font": Geneva 12- or 13-point
"Fixed font": Menlo 12-point
It would be good if people could test this. I've played around a
little, found a few problems and fixed them, but I haven't tested
very intensively yet.
Allin
11 years, 9 months
strings again
by Ignacio Diaz-Emparanza
With respect to this type of definition of a script:
string stringname = $(shellcommand)
It seems stricking that we can put in a string the output of a shell
command, but we cannot put in a string the ouput of a gretl command.
I mean:
string stringname = $g(ols Y const X)
(where $g() means it is a gretl command)
Or, is any other way to do that?
If this were possible, for example one function could make the calculus
and export, via a bundle, the output to another function.
--
Firma Arista
*Ignacio Díaz-Emparanza*
Zuzendaria/Director
ignacio.diaz-emparanza(a)ehu.es <mailto:ignacio.diaz.emparanza@ehu.es>
94 6013732
*EKONOMIA APLIKATUA III SAILA (EKONOMETRIA ETA ESTATISTIKA)/
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
UPV/EHU*
Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
*T.: +34 946013740* | *F.: +34 946013754*
*www.ea3.ehu.es* <http://www.ea3.ehu.es>
ERNE! Baliteke mezu honen zatiren bat edo mezu osoa legez babestuta
egotea. Mezuak badu bere hartzailea. Okerreko helbidera heldu bada
(helbidea gaizki idatzi, transmisioak huts egin) eman abisu igorleari,
korreo honi erantzunda. Kontuz! Mezua ez bada zuretzat, ez erabili, ez
zabaldu beste inori, ez kopiatu eta ez baliatu.
¡ATENCIÓN! Este mensaje contiene información privilegiada o confidencial
a la que sólo tiene derecho a acceder el destinatario. Si usted lo
recibe por error le agradeceríamos que no hiciera uso de la información
y que se pusiese en contacto con el remitente.
E-mail hau inprimatu baino lehen egiaztatu inprimatzeko beharra.
Antes de imprimir este e-mail piense bien si es necesario hacerlo.
11 years, 9 months
strings with several rows
by Ignacio Diaz-Emparanza
Hi,
I am trying to use the commands 'string stringname = $(shellcommand)' or
'string stringname = readfile(filename)'
and after these commands I use 'print stringname' to see how the strings
are formed.
In both cases I am seeing the strings broken, for example at the middle
of the shell command output or at the midle of the imported file. Has
the 'string' command a limit in the number of possible rows? is there
any limit in printing a string? or is it just a bug?
--
Firma Arista
*Ignacio Díaz-Emparanza*
Zuzendaria/Director
ignacio.diaz-emparanza(a)ehu.es <mailto:ignacio.diaz.emparanza@ehu.es>
94 6013732
*EKONOMIA APLIKATUA III SAILA (EKONOMETRIA ETA ESTATISTIKA)/
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
UPV/EHU*
Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
*T.: +34 946013740* | *F.: +34 946013754*
*www.ea3.ehu.es* <http://www.ea3.ehu.es>
ERNE! Baliteke mezu honen zatiren bat edo mezu osoa legez babestuta
egotea. Mezuak badu bere hartzailea. Okerreko helbidera heldu bada
(helbidea gaizki idatzi, transmisioak huts egin) eman abisu igorleari,
korreo honi erantzunda. Kontuz! Mezua ez bada zuretzat, ez erabili, ez
zabaldu beste inori, ez kopiatu eta ez baliatu.
¡ATENCIÓN! Este mensaje contiene información privilegiada o confidencial
a la que sólo tiene derecho a acceder el destinatario. Si usted lo
recibe por error le agradeceríamos que no hiciera uso de la información
y que se pusiese en contacto con el remitente.
E-mail hau inprimatu baino lehen egiaztatu inprimatzeko beharra.
Antes de imprimir este e-mail piense bien si es necesario hacerlo.
11 years, 9 months
Exo vars ordering in system (bug and feature request)
by Sven Schreiber
[if this post comes through twice, have used a wrong email address
before, again...]
Hi,
first of all, sorry for the long post...
Consider the following system where for illustration only a subset of
all exogenous variables (here: seasonal dummies) are used in each equation:
<hansl>
open denmark
genr dummy
system method=ols
equation LRY dq2 const
equation LRM dq1 const
end system
matrix B = $sysB
print B
</hansl>
>From what gretl gives me, the ordering in $sysB is <dq2, const, dq1>,
just like the order in which they appear in the system spec. Ok; now
there are two problems with that:
First what I think is a bug -- in the estimation printout 'const' always
comes first, and it has been said before that the ordering in the
coefficient accessors should be like in the printout. And BTW, which
ordering is the one used by $xtxinv?
Secondly I have a more subtle problem: In my application I do not
specify the equations manually but as a result of some model reduction
procedure. Thus I do not know in advance which exogenous variables
"survive" in which of the equations, and therefore I do not know in
advance in which order they will appear in the final system (and by
implication, in $sysB). But I want to use the final system for
forecasting, and so I need my list (or matrix) of exogenous system
regressors in the corresponding order matching the $sysB structure.
Currently it seems almost impossible (or very difficult) to achieve that.
Of course it is impossible for gretl to guess what the wanted ordering is.
One possibility would be to introduce a new 'sysB_order' keyword which
could be made an optional part of the system spec. For example the above
system would become:
<hansl>
system method=ols
equation LRY dq2 const
equation LRM dq1 const
sysB_order const dq1 dq2
end system
</hansl>
(This would also affect $xtxinv I guess.)
Another (and maybe even better) option would be to make the system-wide
list of exogenous variables accessible, matching the $sysB ordering. Why
not use $xlist for this, which currently isn't used in the system case?
thanks,
sven
11 years, 9 months
Number of digits in export
by Andreas Noack Jensen
I am checking some gretl code against CATS in RATS and using the australian
dataset. When exporting to csv, the variable iau2 only has three digits
after the dot, but the variable has up to four non zero digits after the
dot in gretl and hence I get different results from the exported data than
I do in gretl. Is it a bug?
Best
Andreas
11 years, 9 months
gretl Python example
by Sven Schreiber
Hi,
following Allin's call for suggestions, I'm attaching an example how it
could actually be useful to call Python from gretl. (I'm attaching
rather than pasting it to hopefully preserve the indentation for
Python.) This uses matplotlib's stackplot wich produces a stacked area
plot. I think you need the recent matplotlib version 1.2 for this.
Currently this cannot work out-of-the-box yet at least under Python 3
for the reason explained in the other email. It could work with Python
2, but I couldn't test this so far.
cheers,
sven
11 years, 9 months
python foreign problems
by Sven Schreiber
Hi,
ok I'm really sorry that adding Python support now leads to additional
bugs and problems, but I hope these are just toothing pains:
First, a prelim question: In the gretl_io.py file that gretl writes out,
why use this function
<python>
def gretl_dotdir():
dotdir = "C:/Users/svenne/AppData/Roaming/gretl/"
return dotdir
</python>
instead of just a plain string definition 'gretl_dotdir = "<whatever>"'?
Secondly, in the 'gretl_export()' function (also in gretl_io.py) the
seemingly innocuous line
'r, c = M.shape'
might be problematic for vectors (given the next issue this is currently
hard to test, but I will). The point is that in numpy vectors may be
represented as 1-dim-arrays; their 'shape' tuple will be '(n,)' and thus
have only length one. I guess there are two solutions; either do a check
like 'len(M.shape)==1', or force M to be a numpy-matrix which is
guaranteed to be 2-dim like gretl matrices. Let me test and then think
about it.
Third, a real problem: The gretltmp.py file written by gretl does not
preserve the indentation from within gretl's foreign block! Since Python
uses indentation/whitespace as a syntax element, this is completely
broken. Allin, your example in ch. 39 doesn't have any indented blocks
it seems, and so you didn't notice. BTW, this is on Windows 8, haven't
tested on Linux yet.
And finally, another indentation-related less severe problem: gretl's
script editor's on-the-fly indentation is a little annoying when writing
in Python because it does it wrong (understandably). Could this be
somehow turned off inside foreign blocks?
Thanks,
Sven
11 years, 9 months