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
8 years, 1 month

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
8 years, 3 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*
*
8 years, 4 months

SVAR some questions
by Pindar

Hi there,
the SVAR analysis is a powerful tool and Jack's SVAR package already in
it's present state is magnificent!
At the moment I'm working through it step by step. My ultimate goal is
to perform a 'Structural vector autoregressions with
nonnormal residuals' by Lütkepohl (see attached file). Unfortunately his
examples are SVECMs which makes the stuff even more complicated.
However, while learning from the 'SVAR code' and with Lütkepohl's book
'New Introduction to Multiple Time Series Analysis' I came across the
following questions:
a) In his book on page 367 (section 9.1.3) the Rd matrix (following the
notation of Jack) seems to me wrong.
b) Is it in order to use 'abs(nullspace(R))~R'invpd(R*R')*d' instead of
the things done in imp2exp (and btw. exp stands for expansion, or, and
imp for ?)
<hansl>
nulldata 10
include SVAR.gfn
#example
matrix
R_Luedkepohl={1,0,0,0,0,0,0,0,0;0,0,1,0,0,0,0,0,0;0,0,0,0,1,0,0,0,0;0,0,0,0,0,1,0,0,0;0,1,0,0,0,0,1,0,0;0,0,0,0,0,0,0,0,1}
eval R_Luedkepohl
matrix
R={1,0,0,0,0,0,0,0,0;0,0,1,0,0,0,0,0,0;0,0,0,0,1,0,0,0,0;0,0,0,0,0,1,0,0,0;0,0,0,0,0,0,1,0,0;0,0,0,0,0,0,0,0,1}
eval R
matrix R_orth={0,0,0;1,0,0;0,0,0;0,1,0;0,0,0;0,0,0;0,0,0;0,0,1;0,0,0}
eval R_orth
eval R*R_orth
matrix d ={1;0;1;0;0;1}
matrix Rd=R~d
eval imp2exp(Rd)
matrix s = R'invpd(R*R')*d
eval abs(nullspace(R))~s
<hansl>
Cheers
Leon
8 years, 5 months

Re: [Gretl-users] GARCH, Forecasting
by Allin Cottrell

On Mon, 17 Jan 2011, [ISO-8859-1] Alejandro Mosi�o wrote:
> Maybe i was not too much specific last time:
>
> I have a variable "y" that follows a GARCH(1,1) process. Then, i Gretl i
> type:
>
> garch 1 1 ; y const
>
> Then i got the result and forecasting the out-of-sample values of y can
> be done in the usual way. However, i'm interested in forecasting the
> out-of-sample variance. I don't know if such a function exists in Gretl.
There is no built-in function to do this, but you can compute a
one-step ahead forecast of the variance from the model data, as
hown in the following example script.
<script>
open b-g.gdt
garch 1 1 ; Y
series e = $uhat
series h = $h
dataset addobs 10
a0 = $coeff[2]
a1 = $coeff[3]
b1 = $coeff[4]
series hfc = h
# set future errors to their expectation
e = misszero(e)
# forecast the variance
hfc = a0 + a1 * e(-1)^2 + b1 * hfc(-1)
smpl 1970 ;
print e h hfc --byobs
</script>
Allin Cottrell
8 years, 6 months

VECM in Gretl
by 佃鹏 于

Hi, Gretl team,
I have run the Granger Causality in Gretl using VAR, after that I found there are unit roots in variables. So I changed to VECM model to test the causality between variables for example in following equation: Y =X1+X2+X3. I input Y as endogenous variable and X1 X2 X3 as exogeous variables. But the results didn't come up, it shows “You must select two or more endogenous variables” But in the original regression equation only Y is endogenous variable. why it shows that?
Does it make any difference for the results of Granger Causality if there are unit roots in variables? what should I avoid them instead of using VECM in Gretl?
Thank you for your time Dianpeng YU
8 years, 6 months

RNG
by Marcin Błażejowski

Hi,
is there a way to get exactly the same pseudo random series from uniform
distribution in Gretl and Matlab?
I know that I can generate series in one program, write it as a vector
and so on, but maybe there is a way to make both RNGs to start at the
same point (I've tried to use the same seeds for MT but it doesn't work
even for 0).
Regards,
Marcin
8 years, 6 months

Fw: Can gretl be made to use 'snapshot' & automatically update itself?
by Paul Kibet

----- Forwarded Message -----
>From: Paul Kibet <laboso(a)yahoo.com>
>To: Allin Cottrell <cottrell(a)wfu.edu>
>Sent: Monday, 29 October 2012, 13:13
>Subject: Can gretl be made to use 'snapshot' & automatically update itself?
>
>
>It seems to me like this might not be an easy task especially for the non code-writing people like myself.Is there a way of getting gretl to link up with the 'snapshot' automatically whenever there is a new release and on my promting it to update?
>Thanks for the information though
>Paul
>
>
>
>
>>________________________________
>> From: Allin Cottrell <cottrell(a)wfu.edu>
>>To: Paul Kibet <laboso(a)yahoo.com>; Gretl list <gretl-users(a)lists.wfu.edu>
>>Sent: Monday, 29 October 2012, 12:57
>>Subject: Re: [Gretl-users] Principal Components Analysis Misbehavior
>>
>>On Mon, 29 Oct 2012, Paul Kibet wrote:
>>
>>> I was wondering how i can update the gretl software that i installed on my laptop with the newer solutions that fixes the problems that people keep mentioning?Should i redownload or the internet link that sits with the software automatically?
>>
>>If you're on Windows,
the best thing is to download the "snapshot" from time to time (between releases, that is), from
>>http://gretl.sourceforge.net/win32/ (and similarly for the Mac).
>>
>>The usual caveat applies to snapshots: they may introduce new bugs. But most of the time the snapshot is an improvement over the previous release. And if there's anything particularly experimental/dodgy in the snapshot we try to issue a warning on the mailing list.
>>
>>Allin Cottrell
>>
>>
>>
>
>
8 years, 6 months

ghk function question
by Pindar

Hi there,
recently I wrote a UDF in order to calculate and plot the bivariate
normal distribution.
Now I found the ghk function and tried to replicate the results, but
unfortunately in vain.
I think that I miss-specify the second and third argument. How is a correct?
<hansl>
matrix U=mnormal(400,2)
*matrix A =seq(0,400)/-100 #lower bound **
**A=A'~A'**
**matrix B =seq(0,400)/100 #upper bound **
**B=B'~B'*
matrix vcv=unvech({1;0;2})
matrix f = ghk(cholesky(vcv),A,B,U')
nulldata 400 --preserve
series x1=U[,1]
series x2=U[,2]
series fxy=f[1:400]
<hansl>
Thanks in advance
Leon Unger
8 years, 6 months

i hope good day
by redwan ahmed

Dear sir
first i would to thank 4 give us an opportunity to learn. i am using gretl software and run my model using heteroskedasticity-corrected least squares regression on 2 years data that i pooled them . my question is can i use this regression since i have hetero problem and is this regression FGLS that we learn from econometrics books.
best regards
redwan
8 years, 6 months