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, 8 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
12 years, 1 month
help with SVAR
by mastro2387@tiscali.it
Dear Users,
I am new in Gretl list but I do not know if I am writing to
the right place...anyway I need help with building a SVAR for my
research...just tell me if you can help me please...
Kind regards,
Mirko
Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di uno spot in TV.Per ogni nuovo abbonato 30 € di premio per te e per lui! Un amico al mese e parli e navighisempre gratis: http://freelosophy.tiscali.it/
12 years, 7 months
Function for Automatic Modelling of ARIMA Models
by Henrique Andrade
Dear Gretl Community,
I'm trying to make my first Gretl function and, incredibly [:)], I am
getting no success in this endeavor (and I know this is my fault).
My function estimates, in a automated and simplified way, ARIMA(p,1,q)
models. All that the user needs to do is determine the values of the
maximum "p", the maximum "q", and some simple options (include dummies,
plot graphs, etc.).
The first problem I found is that I can't save the models, so the command
""ARIMA($P,1,$Q)" <- arima $P 1 $Q ; Y --nc" doesn't work and I need to
replace it with "arima $P 1 $Q ; Y --nc".
Another problem: I can't save the forecasts. The command I'm using is
"fcast Y_hat_$P_1_$Q".
Attached you can find two files: "Função AutoARIMA.inp" (with my function),
and "Função AutoARIMA.inp" (where you can find the commands that can
reproduce my function).
Best regards,
Henrique Andrade*
*
12 years, 7 months
Assigning the path to R
by Henrique Andrade
Dear Gretl Team,
I tried to estimate some stuff using R (via Gretl) and I got an error. Look
at the command:
<hansl>
foreign language=R --send-data
l_cambio <- gretldata[,"l_cambio"]
PP.test(l_cambio,lshort=TRUE)
PP.test(l_cambio,lshort=FALSE)
end foreign
</hansl>
Gretl shows me an error message:
"C:/Users/henrique/AppData/Roaming/gretl/R.msg: No such file or directory"
Looking at ".gretl2rc" file I realized what is going wrong:
# Command to launch GNU R
Rcommand = C:\Program Files\R\R-2.15.0\bin\R.exe
# Path to Rterm.exe
Rbin = C:\Program Files\R\R-2.12.2\bin\i386\Rterm.exe
# Path to R library
Rlib = C:\Program Files\R\R-2.15.0\bin\i386\R.dll
The path to Rterm.exe is incorrectly assigned and it can't be changed via
the GUI options. To solve my problem I just edited the path to Rterm.exe:
Before: "Rbin = C:\Program Files\R\R-2.12.2\bin\i386\Rterm.exe"
After: "Rbin = C:\Program Files\R\R-2.15.0\bin\i386\Rterm.exe"
I think it would be good to have this option in our GUI menus (once it
could be difficult to the unexperienced users to edit the ".gretl2rc" file).
Best regards,
Henrique
--
Henrique Andrade*
*
12 years, 8 months
help with panel data
by Karolina Zinkeviciute
Hello gretl users:)
I am asking for some help with panel data.
It's the first time that I'm working with this type of data.
So I'm not fully aware of the steps I should make.
I don't know what should I do before proceeding to the fixed effects test.
What tests should I use for Heteroskedasticity, Autocorrelation and serrial
correlation for panel data?
What other test should I make?
I will be very grateful for any hints:)
Karolina
12 years, 8 months
Restrict command after VECM
by Artur Tarassow
Since some while it is possible to do use the name of a variable for the
'restrict' command after OLS. But this is not the case for the VECM
command. Is there any reason to handle this case differently?
<hansl>
open denmark
ols LRY const IBO
restrict
b[IBO] = 1
end restrict
<hansl>
<hansl>
open denmark
vecm 1 1 LRY IBO
restrict
b[IBO] = 1
end restrict
<hansl>
Thanks,
Artur
12 years, 8 months
problems loading *.mat file into Octave
by Artur Tarassow
Hey,
I want to load two separate matrices into Octave. It seems that I can
only load in one matrix at once and work with it.
<hansl>
foreign language=Octave
A = gretl_loadmat("A.mat")
B = gretl_loadmat("B.mat")
end foreign
<hansl>
So the following example would not work and the error message I get is:
---------
octave exited with status 256IR_nairu1_RC =
error: fscanf: invalid stream number = -1
error: called from:
error: gretl_loadmat at line 16, column 10
error: /home/artur/.gretl/gretltmp.m at line 3, column 12
---------
Is it intended that one can load only one matrix at once? It doesn't
seem plausible since Octave can handle several matrices, of course.
Best,
Artur
12 years, 8 months
Issues compiling latest gretl under Ubuntu 11.04
by Matthieu Stigler
Dear List
I am new to gretl and tried to compile the latest version under ubuntu
11.04.
After installing dependency libgretl1 from
http://packages.debian.org/sid/libgretl1, I downloaded the latest sources,
and run the usual ./configure 2) make ) sudo checkinstall. Important to say
at this stage is that gretl is installed in /usr/local/share/gretl (I guess
contrary to the package from the repo that wouldbe installed in usr/share).
A first (minor) issue when running gretl is that some functions for example
in the time series models (cointegration) are not available. This seems to
have occured already and was easily dealt by changing the gretl directroy,
as recommended in:
http://lists.wfu.edu/pipermail/gretl-users/2011-September/006769.html
The biggest issue I have is that when I try to use some functions in gretl,
it complains that it cannot find these functions. Trying to insall for
example the gig extension, it is unable to install it as it does not find
the /usr/lib/gretl-gtk2/gretlzip.so
indeed, there is not even a /usr/lib/gretl-gtk2/ folder. Even creating that
folder won't help, as it assumes the different files .so are available
here. I thought first it was a confusion of gretl concerning the different
folder, since now it is installed in /usr/local, but it seems there are no
such files as gretlzip.so, nor garch.so anywhere on my disk system
folders...
Could someone explain me when these *.so are supposed to be
downloaded/installed (under which package?). Did I miss something during
the compilation stage? Is there a way to install them "ex-post" from gretl
console?
Thanks a lot!!
Matthieu
12 years, 8 months
Re: [Gretl-users] scatters-command is not allowed within loops
by artur.tarassow@googlemail.com
Thank you for the implementation.
Artur
-original message-
Subject: Re: [Gretl-users] scatters-command is not allowed within loops
From: Allin Cottrell <cottrell(a)wfu.edu>
Date: 21/04/2012 19:38
On Fri, 20 Apr 2012, Artur Tarassow wrote:
> I just wanted to run the 'scatters' command within loops, but it isn't
> possible as it seems. Is this a bug or actually intended?
It was originally intended -- drawing graphs in a loop seemed
like potentially a bad idea -- but since we've now allowed
some graphing commands, disallowing "scatters" seems
inconsistent. It's now allowed in CVS and snapshots.
Allin Cottrell
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
12 years, 8 months