gretl 1.7.6rc1
by Allin Cottrell
Current gretl CVS and the Windows snapshot at
http://ricardo.ecn.wfu.edu/pub/gretl/gretl_install.exe
contain release candidate 1 for gretl 1.7.6.
Please note that this version involves a backward-incompatible
change with respect to gretl 1.7.5 and earlier, affecting
user-defined functions that (a) take a named list of variables as
an argument and (b) do things with the list-member variables by
means of a "foreach" loop on the list.
I won't go into the rationale for this change here. Anyone who
wants the details may look at the proceedings on the gretl-devel
list for July, which were mostly taken up with this issue:
http://lists.wfu.edu/pipermail/gretl-devel/2008-July/thread.html
There's also a brief discussion in the chapter of the User's Guide
that deals with user-defined functions. But here's the bottom
line for users:
* If you want to "get hold of" a list-member variable in the
context noted above, you have to use the syntax listname.varname,
where listname is the name of the list in question and varname is
the name of the list member. (This is required only if you're
working with a list that was supplied as a function argument.)
Trivial example: inside a function, creating new variables which
are the cubes of the members of an original list, xlist, where
xlist is an argument to the function.
Old style:
loop foreach i xlist
$i_3 = $i^3
endloop
New style:
loop foreach i xlist
$i_3 = (xlist.$i)^3
endloop
In the new scheme, "$i" gets the name of the list-member variable
alright, but the variable is not "visible" under that name within
the function. So on the right-hand side of the expression that
creates the cubes, we need "(xlist.$i)^3". (Well, actually the
parentheses are not required, but wearing your seatbelt is in
general a good idea.)
Although this may affect quite a large number of existing
functions, we believe the effects are localized and the update
should be trivial. If anyone has a function for which the update
is _not_ trivial, please let us know.
Allin Cottrell.
13 years, 11 months
inconsistency in PCA function
by Rebecca Zhang
Hi,
I got inconsistent results when running PCA using covariance matrix in gretl. Please see attached TSY_curve file for the data used. Please see attached PCA_problem file that illustrated the problem when verified with R.
The result highlighted in yellow is different from R result and appears in consistent with a reduced components result. I appreciate if you can look into it. Thank you.
Regards,
Rebecca
14 years, 4 months
Re: [Gretl-users] Gretl-users Digest, Vol 32, Issue 13
by Mike Pfeiff
Thank you.
I was working with quarterly GDP and monthly employment data. I wanted
to "compact" the monthly employment data to quarterly and estimate a
relationship between the two series.
I brought the data into GRETL from an ODBC connection from my own access
database that scrapes most current data from BLS and BEA. The database
servers in GRETL are great but the best I can tell is there is some
delay in updating the data.
Since I need the most current data available for my application, I built
a access database to scrape the government websites and serve as a
repository for my data.
I've used Matlab applications in the past that allowed workspace
variables to have different frequencies and thought GRETL might be the
same.
Instead of GRETL as my data processing engine, I think it more efficient
to do my data processing (compacting etc) in access and create a access
data table to be brought into GRETL cleanly.
I'm not suck on this concept so if you think it might be efficient for
me to do it another way I would love to hear your thoughts.
By the way, I have to say how much fun I am having learning GRETL and
Econometrics again. Thank you very much for all your efforts.
-----Original Message-----
From: gretl-users-bounces(a)lists.wfu.edu
[mailto:gretl-users-bounces@lists.wfu.edu] On Behalf Of
gretl-users-request(a)lists.wfu.edu
Sent: Wednesday, September 09, 2009 7:48 AM
To: gretl-users(a)lists.wfu.edu
Subject: Gretl-users Digest, Vol 32, Issue 13
Send Gretl-users mailing list submissions to
gretl-users(a)lists.wfu.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.wfu.edu/mailman/listinfo/gretl-users
or, via email, send a message with subject or body 'help' to
gretl-users-request(a)lists.wfu.edu
You can reach the person managing the list at
gretl-users-owner(a)lists.wfu.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Gretl-users digest..."
Today's Topics:
1. Re: compacting a single variable? (Allin Cottrell)
2. Re: Open .xls files (Henrique)
3. Opening a spreadsheet file (Henrique)
4. Re: Opening a spreadsheet file (Allin Cottrell)
5. Re: Opening a spreadsheet file (Allin Cottrell)
6. Re: Corrgm function (after thinking) (Ofer Cornfeld)
7. Re: Corrgm function (after thinking) (chris)
8. Re: Corrgm function (after thinking) (Ignacio Diaz-Emparanza)
----------------------------------------------------------------------
Message: 1
Date: Tue, 8 Sep 2009 12:59:03 -0400 (EDT)
From: Allin Cottrell <cottrell(a)wfu.edu>
Subject: Re: [Gretl-users] compacting a single variable?
To: Gretl list <gretl-users(a)lists.wfu.edu>
Message-ID: <Pine.A41.4.58.0909081256210.1970306(a)f1n11.sp2net.wfu.edu>
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Tue, 8 Sep 2009, Mike Pfeiff wrote:
> I know you can compact a dataset, but is there a way to compact a
single
> variable?
No, that wouldn't make sense: you can't have a gretl dataset in
which variables of differing frequencies coexist. But of course
you can do:
store singlevar.gdt x
open singlevar.gdt
dataset compact <params>
store singlevar.gdt x
then reopen singlevar.gdt to get the compacted version of x.
Allin Cottrell
------------------------------
Message: 2
Date: Tue, 8 Sep 2009 18:34:01 -0300
From: Henrique <henrique.coelho(a)gmail.com>
Subject: Re: [Gretl-users] Open .xls files
To: Gretl list <gretl-users(a)lists.wfu.edu>
Message-ID:
<b3173c600909081434h5cd6bdd7lc3679630823e5880(a)mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
2009/9/8 Allin Cottrell <cottrell(a)wfu.edu>
>
> I don't know without seeing your xls file. I get correct results
> here opening xls with --sheet and --rowoffset specifications,
> provide those specifications are right, i.e., in this case row 2
> in sheet 2 contains variable names, starting in column 1, and
> subsequent rows contain data.
>
I also get correct results using another xls files.
> You might want to check that the file doesn't contain "junk" off
> screen to the right of the area you want gretl to read.
>
I checked my file and it doesn't have this kind of problem. I think my
problem is caused by incorrect external links inside my xls file. I
fixed it
and now everything is working properly. Thanks a lot!
Henrique
14 years, 10 months
Calculate trend from csv via cli
by Marco Dieckhoff
Hi!
I'm a complete "newbie" to statistics and tripped over Gretl looking for
time series analysis programs.
I played around a bit and read the documentation, and I'm still not sure
if Grelt can do what I'm looking for (not to mention how).
I have sets of data in csv that I want to process via the command line
interface:
epoch seconds ; value (floating point)
My goal is to calculate a trend of future data so that it can be
presented in a graph.
I therefore either need a function output to calculate the trend myself
or I need gretl to calculate further data proposes for me.
(Maybe I already tripped over the values defining the function I'm
looking for and did not recognise them as such, some examples would be
highly appreciated.)
Is that possible with Gretl?
Can you rtfm me in the right direction?
Thanks,
Marco
15 years
GARCH for day-ahead electricity prices
by Saqib Ilyas
Hi all
I am using the 2006 till 2009 data for the New England pool of day-ahead
weighted average prices. I am not very fluent with econometrics, but I read
in some papers that GARCH has been used successfully to forecast electricity
wholesale prices. When I train a GARCH model on one year worth of data, and
forecast for the last 3 days of training data, I get a mean absolute error
of 3.6642%. The error increases to 27.826% when I use two years worth of
data, and decreases to 17.123% when using three years worth of past data. Is
this expected?
Also, when I plot the actual and fitted data against time, the GARCH model
seems to have done a really bad job, compared to a default ARIMA model. I'm
guessing this might be because people are actually using ARIMA models with
(added) GARCH errors, so a simple GARCH model-based forecast isn't doing
exactly what they have done. Am I right? Why would the ARIMA be a better fit
than GARCH?
One author mentioned that they took a log of the prices (in their case it
was hourly prices) before fitting a GARCH model. In your opinion, is that an
important factor in the kind of errors I am getting?
Thanks and best regards
--
Muhammad Saqib Ilyas
PhD Student, Computer Science and Engineering
Lahore University of Management Sciences
15 years
Gretl update message
by Henrique
Dear Gretl users/developers,
When I check the option "Tell me about gretl updates" (under Tools ->
Preferences -> General) and try to re-initialize the software, Gretl stops
to work. All that I see is a blank window with the name gretl in the top.
I'm using Gretl for Mac (Leopard), build date 2009-09-26.
Best,
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
15 years
import
by Alan G Isaac
User Guide 4.4 refers to the `import` command.
It does not appear in the command ref.
If you go to the console and type::
help import
you are told `import` is not a gretl command.
It is of course, but apparently undocumented?
I'd like to import data from a CSV file.
I'd like to do this in a script.
In addition to being able to specify the date
range,I need the following functionality:
skiplines: the number of lines to skip at the
beginning of the file
usecols: which columns to use for data
varnames: specify names (which are not in the CSV file)
Possible?
Finally, if specifying the date range is not possible,
is it possible to reset the dataset structure at the
command line (rather than via menus)?
Thanks,
Alan
15 years
working directory
by Alan G Isaac
I would like to change working directory dynamically in
a script, to the location of the script (*without* knowing
where that is). Is there an easy way (for students)?
I realize they can change working directory in a shell
and set the gretl option to follow this. That's not what
Perhaps I'm looking for something like __file__ in Python
(e.g., a gretl string `scriptdir` that gretl would set when
running a script).
Thanks,
Alan Isaac
15 years
Re: [Gretl-users] Can gretl allow to save lists for future use (Sven Schreiber)
by YiMin Chen
Hi Sven,
Thank you for your reply.
What I meant is that, e.g., if I create a list of the code of 50 states
list statelist = AR MA PA ...
I can save this statelist somewhere. Next time I do not need to create this
list again. I just retrieve it from the file. So, when I need to do the data
of the population of the 50 state, I can just create a new list from it by
typing
list statepop = statelist suffix pop
then I can get the state population variable list
ARpop MApop PApop ...
In the reverse case, if I get the list statepop from the variable names in
from the population by state dataset, and I want to get the state code list
from it, I can type
List statelist = statepop strip pop
Then I can get the state code list
AR MA PA ...
Anyway, I can save the lists I created for future manipulation and use,
especially when they are very long lists. Can gretl allow doing that?
Regards
YiMin Chen
------------------------------
Message: 2
Date: Fri, 25 Sep 2009 14:51:35 +0200
From: Sven Schreiber <svetosch(a)gmx.net>
Subject: Re: [Gretl-users] Can gretl allow to save lists for future
use
To: Gretl list <gretl-users(a)lists.wfu.edu>
Message-ID: <4ABCBCD7.9020403(a)gmx.net>
Content-Type: text/plain; charset=UTF-8
Hi,
not sure what you mean: it _is_ possible to save the list members to
separate files and re-open them later on. But I admit that you would
have to write a script for that I guess.
Or do you mean you want to save the definition of a list as a kind of
object in a gretl session file, instead of the values of the series in
the list? I'm not sure if that's implemented.
cheers,
sven
YiMin Chen schrieb:
> Dear Developers,
>
> I am new to this great econometric software. Its list function is very
> useful, obviously an edge over the EViews? Group function. It will be
> even more useful if gretl provides more ways to create and manipulate
> lists, and most importantly, can save the lists in a file and can be
> retrieved for future use. I do not know how much work it needs to add
> such capacity to gretl. Is there anyone interested in adding such
> capacity to gretl?
>
> Beast regards,
>
> YiMin Chen
>
15 years