I'm beginning to get cosy with gretl's session concept. However, after
using it a little bit I'm wondering: when there is a "defined" session
in course (i.e. one that was saved to a .gretl file and hasn't been
ended) the information about the session name doesn't seem to be
available. (Well maybe indirectly via File -> Session files -> first
entry in the recent session files list.) Note the contrast to the name
of the current workfile which is always displayed in the main window (of
So how about using the line where the workfile name is displayed to also
display the name of the current session (and whether it has unsaved
Marcin B. has been in touch with me about providing an accessor or
function such that you could retrieve ACF/PACF values for further
analysis, and I thought I'd bring this issue to the list.
Marcin originally requested an accessor, $corrgm, and I replied by
suggesting a function, acf(y, p) [y = series, p = max lag] which
would return a column vector. The correspondence then continued
as below. Comments welcome.
On Sun, 25 Jan 2009, Marcin B�^Bażejowski wrote:
> I was rather thinking about pacf() function (as a tool for
> determining order of autoregressive of given proces) and my
> thoughts was like thist (but it's only suggestion):
> $corrgm(m,n), where "m" is a order of function and "n" is a
> value of function (acf, pacf and so on).
In gretl's syntax, $foo is used strictly as an accessor for a
previously calculated result. So my thinking is that $corrgm
would have to retrieve the result from a previous "corrgm" command
(presumably, in the form of a vector of values).
This could work, but my alternative thought was to provide a
function acf() -- or corrgm(), the name doesn't matter much --
that works in a "stand-alone" manner to provide an acf vector.
This seemed a little more "natural" to me than using an accessor.
Now I take your point that one might also want the partial
autocorrelations, or for that matter the cross-correlogram of two
variables. We could do this by providing three functions, e.g.,
xcf(x, y, p)
where x and y are series and p is the maximum lag. It would be
possible to combine acf and pacf into one function by using a
third boolean parameter to distinguish the cases -- or, I suppose,
we could have a corrgm() function with returns a p x 2 matrix with
the ACF in column 1 and the PACF in column 2. I'm not sure which
of these options is best.
I encountered the following problem when specifying a VECM with
I wanted to specify x(-1) as a restricted exogenous variable. It turned
out to be not so easy to get the lag in there instead of just the
contemporaneous value; adding the lag of x to the dataset doesn't help,
because the lags don't show up in the VECM specification dialog. So I
had to manually create an auxiliary variable holding the lag of x.
Given that the VAR specification dialog has a great interface for
choosing the lags of exogenous variables, wouldn't it be natural to have
the same thing in the VECM window?
And while we're (or I'm) at it, couldn't this flexible approach for
choosing lags also be extended to endogenous variables?
[moving this over from users to devel]
I guess what I mean is:
in a 'loop for i=1..10' expression, the index i obviously takes on
integer values, and it is clear that you have to do some type conversion
to get strings out of that. Hence in that case $i is perfectly intuitive.
However, in a 'loop foreach i peach pear plum' expression it...
(a) either looks as if i takes on the names of the series. Then why on
earth do I need to use $i instead of just plain i? Or...
(b) the index i really must be thought as looking up the id numbers of
the involved series, and hence is a number. But if series 'peach' has
id#2, then I would expect $i to give the string representation of "2".
In that case, to get back the name of 'peach' through the loop index i
in the first iteration, I would rather have a syntax like 'name(i)', or
some other prefix like '§i' or whatever. Otherwise IMHO it clashes with
the use in the standard for loops, see above, and that's what I find
Was that understandable know, or have I maybe got it all wrong?
thanks for the patience,
On 30.01.2009 02:22, Allin Cottrell wrote:
> On Thu, 29 Jan 2009, Sven Schreiber wrote:
>>> In a "foreach" loop the '$i' construction works by lookup: it
>>> indexes into the relevant array of strings or variable names and
>>> returns entry i at iteration i.
>>> In other sorts of loops, '$i' just gives the string representation
>>> of the current index value, as if you had done
>>> sprintf foo "%d", i
>> See I guess it's exactly this double, context-dependent, meaning
>> that I find confusing. I associate $i with string
>> representation, and then I'm all baffled why that (in a foreach
>> loop context) won't give me a string with a series name, but
>> some totally different thing.
> Er, sorry, but what totally different thing? "A string with a
> series name" is exactly what it gives you, no?
> For example, in
> open data4-1
> list L = 1 2 3
> loop foreach i L
> print $i
> the loop part is equivalent to typing
> print price
> print sqft
> print bedrms
> and in
> open data4-1
> list L = 1 2 3
> loop foreach i L
> print "$i"
> the loop is equivalent to typing
> print "price"
> print "sqft"
> print "bedrms"
> I don't mean to be unhelpful, but I don't yet understand the
> problem. It seems totally transparent to me ;-) (who wrote it!).
> Gretl-users mailing list
I'm used to the behavior that there appears an asterisk behind the file
name in the main window when the workfile is changed and needs to be saved.
But I just applied the HP filter to a variable and saved the output into
a new variable (tick box). There is no asterisk but at the same time the
file doesn't seem to be saved automatically. Is this a bug?
Regarding the new modprint command...
1. Document it in the user's manual.
2. Add it as a recognised highlighted command in script files (e.g. mark it
with brown just as the print and printf commands).
When trying to edit the gretl wiki, I get the following error message:
A database query syntax error has occurred. This may indicate a bug in the
software. The last attempted database query was:
(SQL query hidden)
from within function "Article:getHiddenCategories". MySQL returned error "
1146: Table 'wikidb.page_props' doesn't exist (localhost)".
Do you remember that I'd created a folder in the gretl repository
(called PO)? After this I sent a request to SourceForge and they said that
this task could be done by myself (in the past, only the SourceForge was
able to delete modules in the repositories).
The topic "CVS self-service repository management launched 2008-12-11"
explains how to do this, but, unfortunately, I was unable to do this (I
really need to improve my CVS skills). The topic says:
SourceForge.net now permits project administrators to perform file
management operations on their CVS repositories via our interactive shell
This capability can be used for changing file permissions,
renaming/moving/deleting files, directories and modules within the
repository, and also permits file editing. In the past it has always been
necessary to have SourceForge.net staff perform these operations on your
To use this facility, login to an interactive
follow the instructions you see when you run:
Please, can you do this? I'd tried but I'm not sure how this works.
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul