missing deterministics in $system.xlist
by Sven Schreiber
Hi,
I've noticed that the list of exogenous terms of a VAR system via the
$system.xlist accessor does not include 'const'. This is in contrast to
the $xlist analogue after ols.
Also, while the trend term is not included in $system.xlist when the VAR
is estimated with the --trend option, if instead I specify something like:
var 2 X Y ; time
then 'time' shows up in $system.xlist.
I can actually understand the rationale: Only explicit terms are
included. However, that is also not 100% true, because even after the
redundant thing here...:
var 2 X Y ; const
the $system.xlist is still empty and doesn't show const.
It would be useful if the exact specification of the VAR could be read
off the $system accessor. Right now I only see the workaround to look at
the first column of the matrix $system.X.
And while we're at it: The doc for $system says: "...referenced by keys
that are the same as the regular accessor names".
- But instead of $system.compan we have $system.A.
- $system.vma is also missing, but we already talked about the
peculiarity of the $vma accessor...
thanks,
sven
5 years, 10 months
date/time things
by Allin Cottrell
Further to the point first raised by Artur in
http://lists.wfu.edu/pipermail/gretl-devel/2019-February/009448.html
the $now accessor and the two closely related (complementary)
functions strftime() and strptime() are now documented, to a degree,
in git and snapshots.
As Jack said, the str*time() functions are maybe not very intuitive,
though they are quite standard (C, python, Ruby and R, among other,
support them). So if people wish to request more clarification and
examples, please so request. We want them to be usable!
Allin
5 years, 10 months
error reading empty matrix, mread
by Sven Schreiber
Hi,
see the following:
<hansl>
matrix m = {}
mwrite(m, "mcheck.mat", 1) # OK
mread("mcheck.mat", 1) # fails
</hansl>
I guess if gretl is ready to write an empty matrix, it should also read
them, no?
thanks,
sven
5 years, 10 months
time functions in git
by Allin Cottrell
Sorry, all, there's a little churn going on here. But given the 't'
in gretl I think we should spend a little time -- and tolerate some
devel churn if need be -- to get our time-handling to a level
comparable with, say, R and python.
Here's an illustration of the latest state of play with no comment
as yet -- except that the "strtime" function I mentioned earlier is
now renamed as "strftime". Some of you will recognize "strftime" and
"strptime" as C library functions, which have been adopted under the
same names by other software that takes time seriously.
<hansl>
matrix tm = $now
eval strftime(tm[1])
tt = strptime(20161225)
eval strftime(tt)
tt = strptime("2016-12-25")
eval strftime(tt)
tt = strptime("Thursday 02/07/2019", "%A %m/%d/%Y")
eval strftime(tt)
</hansl>
Allin
5 years, 10 months
system date and clock accessor
by Artur T.
Dear all,
does gretl have an accessor for accessing the system's calendar date and
time? I couldn't find anything on this.
I am sure one could use some shell command within unix/linux but I would
have no idea how to grab such information on a windows of mac os machine.
Best,
Artur
5 years, 10 months
Fwd: system date and clock accessor
by Cottrell, Allin
I sent this just to Jack by mistake, but I guess it might be of wider
interest.
On Thu, 7 Feb 2019, Riccardo (Jack) Lucchetti wrote:
> On Thu, 7 Feb 2019, Allin Cottrell wrote:
>
>> [...] I think it might be nice to return a 2-vector holding
>> time_t and epoch day. Then
>>
>> if $now[1] > n
>>
>> would have one-second resolution and
>>
>> if $now[2] > n
>>
>> would have one-day resolution, and now[2] could be passed directly to
>> isodate() or juldate().
>
> sounds good to me!
Here's what I just pushed to git: $now gives a 2-vector with Epoch
seconds (time_t) first then ISO 8601 basic date (numeric, YYYYMMDD).
I've modified the epochday() function so that it will accept a single
argument in the latter form in place of separate Y, M and D arguments.
I've also exposed strftime under the name "strtime": you can pass it
$now[1] to get formatted date/time. The default format is "%c" ("the
preferred date and time representation for the current locale") but
you can pass a format of your own choosing via a second, optional
string argument. The possibilities for this can be found in the
strftime manpage.
http://man7.org/linux/man-pages/man3/strftime.3.html
<input>
matrix tm = $now
printf "seconds since Epoch %.0f, ISO basic date %d\n", tm[1], tm[2]
eval strtime(tm[1])
eval epochday(tm[2])
s = strtime(tm[1], "It's now %l:%M %p on %A.")
s
</input>
<output>
? matrix tm = $now
Generated matrix tm
seconds since Epoch 1549567516, ISO basic date 20190207
? eval strtime(tm[1])
Thu 07 Feb 2019 02:25:16 PM EST
? eval epochday(tm[2])
737097
? s = strtime(tm[1], "It's now %l:%M %p on %A.")
Generated string s
? s
It's now 2:25 PM on Thursday.
</output>
Allin
5 years, 10 months
Issue reading in date variable
by Artur T.
Dear all,
I've got two example dataset where time-units are decoded as YYYY-MM-DD.
I am just puzzled that in case the time-variables is named "z"
everything works fine (see data1.csv).
However, once the column name is "DATE" (see data2.csv), I obtain the
following error as variable "DATE" is no part of the dataset -- at least
it doesn't appear in main window.
I am using the current git-version on linux.
<error>
first row label "2019-02-04", last label "2019-02-05"
trying to parse row labels as dates...
Trying date order YYYYMMDD
Could be 2019-02-04 - 2019-02-05
Listing 3 variables:
0) const 1) unit 2) Y
? setobs unit DATE --panel-vars
Data error
Error executing script: halting
> setobs unit DATE --panel-vars
</error>
<hansl>
clear
# works
open data1.csv # please adjust path
setobs unit z --panel-vars
# Doesn't work when time-variable is named "DATE"
open data2.csv # please adjust path
setobs unit DATE --panel-vars
</hansl>
Best,
Artur
5 years, 11 months
GMP requirement
by Allin Cottrell
Those using git may have noticed that I recently added a configure
option for the gretl build, --disable-gmp. Here are a few words of
caution and explanation.
First, using the new option is not generally recommended. Besides
supporting the "mpols" command we also make use of the GMP library
in various contexts where we reach the edge of numerical precision
using standard 8-byte "doubles". And disabling GMP also disables the
--progressive option to the "loop" command.
I introduced the option to ease building of gretl on high
performance clusters. I find that GMP is not usually installed by
default so you have to compile the library yourself, and that can be
tricky if the head nodes (where you log in and build stuff) differ
in architecture from the compute nodes.
So, best to think of this as a "cluster only" option, which may make
life easier if you're pretty sure the jobs you want to run won't
require GMP.
Allin
5 years, 11 months
alias for coint2?
by Sven Schreiber
Hi,
during the latest discussion about Johansen critical values it occurred
to me (again) that gretl's command name "coint2" is a bit weird. It is
purely historical to differentiate it from the Engle-Granger coint.
Maybe some alias would be nice, like "cointjo" or "johansen" or whatever.
Or maybe it's just me.
thanks,
Sven
5 years, 11 months
dropping "time" in a function
by Sven Schreiber
Hi,
the following isn't new, and maybe we discussed it already:
<hansl>
function void checkl(list L)
L -= const time
list L print
end function
list myL = time
checkl(myL) # still shows time
</hansl>
Note that outside of a function it works.
thanks,
sven
5 years, 11 months