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.
14 years, 2 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, 6 months
Gretl, R & OS X
by Henrique
Dear Gretl community,
I can't start R from Gretl (Menu -> Tools -> Start GNU R) on
my Mac (Snow Leopard). The command to launch is "xterm -e R". What's
wrong?
Best,
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge
15 years
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
15 years
Econometrics package that cannot plot?
by Vytautas M
Hi,
I'm trying to plot simple weekly time series
x
2009/11/27 3
2009/12/04 1
2009/12/11 2
But I get strange 2009.91, ...., 2009.94 x axis labels.
Econometrics package that cannot plot?
Thanks,
Vytautas Maniusis
15 years
VAR
by Remigijus Lapinskas
Dear list,
I am new to gretl. I would be very grateful to someone who could explain
me how to predict a VAR model, say,
var 1 aa bb cc
to 12 coming quarters. And also, how to plot the forecast.
Best wishes,
Rem
15 years, 1 month
fast excel->gretl (might be off topic)
by Patricio Cuarón
Hi. This might come handy for people working with heterogeneous data before
passing it to gretl. I'm using them along the scripts discussed earlier on
this list for making seasonal adjustment of several variables at once, but
of course using this + your custom scripts could help you in analysing your
excel data faster with gretl if that's how you get or preprocess your
information before being ready to using it.
You select a range in excel, press the hotkey assigned and gretl opens with
the data you selected. If the series are in the form of rows instead of
columns, use the second macro "rangos_a_gretl_y_transponer" which transposes
the range before sending it to gretl. The macros are kind of robust, they
work on excel 2010 32bit + windows 7 and excel 2007 + XP and vista + 2007.
Declare Function ShellExecute Lib "Shell32.dll" Alias "ShellExecuteA" (ByVal
hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal
lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long)
As Long
Sub rangos_a_gretl()
rangos_exportar_rapido formato:=xlCSV, abrir_gretl:=True,
transponerb:=False
End Sub
Sub rangos_a_gretl_y_transponer()
rangos_exportar_rapido formato:=xlCSV, abrir_gretl:=True,
transponerb:=True
End Sub
Sub rangos_exportar_rapido(formato As XlFileFormat, Optional abrir_gretl As
Boolean, Optional transponerb As Boolean, Optional filtro As String)
'based upon http://www.ozgrid.com/forum/showthread.php?t=76720
'export Macro
Const SW_SHOW = 1
Const SW_SHOWMAXIMIZED = 3
Dim fPath As String
Dim nArchivo As String
'Dim pregunta_abrir_gretl
Dim retval
Dim argumento As String, gretl_path As String
'Dim transponer
'Dim transponerb As Boolean
If (Not ActiveWorkbook Is Nothing) Then
fPath = ActiveWorkbook.path
nArchivo = ActiveWorkbook.FullName
If (Not Selection Is Nothing) Then
If TypeName(Selection) = "Range" Then
If Selection.Count >= 4 Then
'transponer = MsgBox("¿Transponer el rango?", vbYesNo)
'If transponer = vbYes Then
' transponerb = True
'Else
' transponerb = False
'End If
sp_Speed
Selection.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues,
Transpose:=transponerb ', Operation:=xlNone, SkipBlanks:=False,
Transpose:=False
Application.DisplayAlerts = False
If fPath = "" Then nArchivo = Environ$("USERPROFILE") &
"\My Documents\" & "archivo no guardado del " & Format(Date, "yyyy.mm.dd, a
las ") & Format(Time, "hh.mm") & " hs"
ActiveWorkbook.SaveAs Filename:=nArchivo & "
exportado.csv", FileFormat:=formato, CreateBackup:=False
ActiveWorkbook.Close
Application.DisplayAlerts = True
sp_Unspeed
'pregunta_abrir_gretl = MsgBox("¿Abrir Gretl?", vbYesNo)
If abrir_gretl = True Then
'Debug.Print """" & nArchivo & " exportado.csv"""
'Debug.Print fPath
argumento = """" & nArchivo & " exportado.csv" &
""""
If filtro <> "" Then argumento = """" & filtro &
""""
Debug.Print argumento
gretl_path = Environ("programfiles") &
"\gretl\gretlw32.exe"
retval = ShellExecute(0, "open", gretl_path,
argumento, fPath, SW_SHOWMAXIMIZED)
End If
End If
End If
End If
End If
End Sub
15 years, 1 month
operate on all variables
by Patricio Cuarón
Hello. I'm new to gretl and I'm trying to create a simple script that will,
for instance, seasonally adjust all variables. And I've run into troubles.
So...
1. how do I generate variable *variable names* to genr? for instance, I want
to call each detrended variable "sa_" & the original variable name
2. how do I pass the parameter to deseas()? deseas(gdp) works fine, but
deseas(varname(4)) doesn't (assuming varname(4)="gdp", varname returns a
string and deseas doesn't work that way. I also tried looping through a list
of all the variables, but the same error of erroneous argument type is
brought up by deseas().
Thanks!!
PC
15 years, 1 month