Examples of Gretl scripts
by Carlos Andrade
Dear All,
Where to get examples of Gretl scripts for different types of analysis?
--
Atenciosamente,
Prof. Carlos A. S. de Andrade
LAPEA - Laboratório de Pesquisa em Economia Aplicada e Engenharia de
Produção
Universidade Federal de Campina Grande.
Centro de Humanidades
Unidade Acadêmica de Economia
11 years, 5 months
Problems running Gretl on Mac OSX Lion
by Mirko Weber
Hello Community,
i have some problems running Gretl on Mac OSX Lion. I have Intel i5 Macbook Pro from 2011 and I followed all the steps on
http://gretl.sourceforge.net/mac-intel.html
including the installation of GTK+ Framework and the the steps given in the README.pdf. When i wanted to open Gretl in the normal Applications Folder it gives me the Message:
"You can´t open the Program "Gretl", because it is not supported by your type of Mac"
(Because I´m from Germany i had to translate the error message, so it might look slightly different on english)
I definitely downloaded the gretl version for intel macs and the right GTK+ Framework (I did it several times to be sure as it did not work) and as my Os is Lion, X11 was already installed. So i followed the Trouble-Shooting section in the README.pdf an executed Gretl manually via X11 xterm. Then this error-message appears:
dyld: Library not loaded: @executable_path/../lib/libgmp.3.dylib
Referenced from: /Applications/Gretl.app/Contents/Resources/bin/gretl_x11
Reason: no suitable image found. Did find:
/Applications/Gretl.app/Contents/Resources/bin/../lib/libgmp.3.dylib: file too short
/Applications/Gretl.app/Contents/Resources/bin/../lib/libgmp.3.dylib: file too short
Trace/BPT trap: 5
I tried to find answers in the previously discussed problems on running Gretl on mac, but i did´t find anything that worked for me!
Thanks for your answers and greetings
Mirko
11 years, 8 months
Principal Components Analysis Misbehavior
by Henrique Andrade
Dear Gretl Team,
I think I found a possible error using the
"pca" command. Please take a look at the
following code:
<hansl>
open australia.gdt
pca PAU PUS E --save-all
# It saves all the components
clear
open australia.gdt
pca PAU PUS E --save[1]
# It saves only the first component
clear
open australia.gdt
pca PAU PUS E --save[2]
# It was supposed to save only the second
# component, but Gretl saves only the first
clear
open australia.gdt
pca PAU PUS E --save[3]
# It was supposed to save only the third
# component, but Gretl saves only the first
<hansl>
According to the Gretl's Help, in respect to
the option "--save[=n]":
"If you provide a value for n with this option
then the most important n components are
saved."
Additionally, inside a BIG loop I am building,
the order of the options "--save[1]" and "--quiet"
is changing the behavior of Gretl.
Using the format "pca ... --save[1] --quiet"
doesn't suppress the printing of the PCA
results. To suppress, I need to use
"pca ... --quiet --save[1]".
Best regards,
Henrique Andrade*
*
11 years, 9 months
a list in a bundle?
by Lee Adkins
Can a bundle contain a list? If so, how? If not, are there
any preferred workarounds?
Cheers,
Lee
--
Lee Adkins
Professor of Economics
lee.adkins(a)okstate.edu
learneconometrics.com
11 years, 10 months
Compute an integral
by Jean-Baptiste Combes
Dear all,
I am using Grelt 1.8.7 with Ubuntu and I am mainly using it for
teaching. With colleagues we are preparing tutorials.
One of the tutorial estimate a weibull model with the mle block. We use
censored data on unemployment. I have heard that there is a "duration"
command but for teaching purposes we prefer to use the mle block. We are
quite keen on making sure students understand the different
contributions to the likelihood.
On top of that we would like them to estimate the mean time passed in
unemployment. The mean of a weibull distribution is not very easy to
compute by hand. Again I know that $yhat save exactly this after a
"duration" command but we are interested in doing it by hand.
How do you compute an integral within gretl?
I hope this message is clear enough,
JB
11 years, 10 months
A Potential (And Curious) Bug
by Henrique Andrade
Dear Allin,
I found a potential bug using multiple loops. Please take a look at the
following Hansl code:
<hansl>
open australia.gdt
loop i = 1..6
loop j = i+1..i+2
print "Hello World!"
endloop
endloop
</hansl>
In that case I get this error message:
"Erro de sintaxe na expressão genr" ("Syntax error in genr expression")
I do not know if there is something wrong in my code, but I did not get
this error before Gretl. 1.9.10cvs. When I try to fix this error by putting
"$" or "()" inside the second loop Gretl crashes:
<hansl>
open australia.gdt
loop i = 1..6
loop j = $i+1..$i+2
print "Hello World!"
endloop
endloop
</hansl>
The most intriguing fact is that these problems disappear when I use Gretl
in English (instead of Brazilian Portuguese).
Best regards,
Henrique Andrade*
*
11 years, 10 months
Linguistic variables.
by Mariusz Doszyń
Hello,
I want to add some kind of linguistic variable to my data set (in form of a
vector). This vector will contain name of the method used while calculating
forecasts for each variable. Maybe you have any ideas how to do this in
Gretl?
Thanks for all (also previous) replies.
Regards,
Mariusz (Poland)
--
Mariusz Doszyń
11 years, 10 months
Number of valid observations.
by Mariusz Doszyń
Dear Gretl Useres!
I've 30 variables and want to generate vector n with number of valid
observations for each variable. I'm using 'ok' function but something is
wrong (see script below). Probably '$i' is not taken as a i-th variable but
as a series containg only "i". What do you think about it? How to be sure
that '$i' is taken as a i-th variable?
<hansl>
n=zeros(30,1)
loop i=1..30
a=sum(ok($i))
n[i,1]=a
endloop
print n
Regards,
Mariusz
--
Mariusz Doszyń
11 years, 10 months
Number of valid observations.
by Mariusz Doszyń
Dear Gretl Users!
I've 30 variables and want to generate vector (n) with number of valid
observations for each variable. I'm using 'ok' function but something is
wrong (see script below). Probably '$i' is not taken as an i-th variable
but as a series containg only "i". What do you think about it? How to be
sure that '$i' is taken as an i-th variable?
<hansl>
n=zeros(30,1)
loop i=1..30
a=sum(ok($i))
n[i,1]=a
endloop
print n
Regards,
Mariusz
11 years, 10 months