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

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
11 years, 10 months

Slightly off topic questions
by Data Analytics Corp.

Hi,
I currently teach econometrics at Rutgers where I use Gretl for lab
assignments. I may have the chance to teach an economic forecasting
course in the Fall and if so, I want to use Gretl there also. I have
two questions. First, does anyone have any experience using Gretl in an
economic forecasting course that they would be willing to share
experiences or know of a course that I can use for ideas? Second, does
anyone know good book for such a course? Any input is appreciated.
Thanks,
Walt
________________________
Walter R. Paczkowski, Ph.D.
Data Analytics Corp.
44 Hamilton Lane
Plainsboro, NJ 08536
________________________
(V) 609-936-8999
(F) 609-936-3733
walt(a)dataanalyticscorp.com
www.dataanalyticscorp.com
_____________________________________________________
12 years, 5 months

Scalar to series (or Scalars in a dataset) ?
by Bulent Erdemir

Hi,
I'm trying to run multiple OLS's over many data sets and try to figure out
the best R square. Therefore, in a loop, I want to issue ols command
multiple times and store the r-square for each command result in a dataset.
Later I'll sort this dataset and see the max R-square and the associated
dataset .
Following a similar pattern in Lee C. Adkins' book, "Using gretl for
Principles of Econometrics, 3rd Edition", I tried to use the store command
like in the example in the book, on page 30 (pdf page 44), below:
#Monte Carlo
open "c:\Program Files\gretl\data\poe\food.gdt"
set seed 3213789
loop 100 -- progressive
genr u = 88*normal()
genr y1 = 80 + 10*x + u
ols y1 const x
genr b1 = $coeff(const)
genr b2 = $coeff(x)
print b1 b2
store coeff.gdt b1 b2
endloop
I applied this method to my script however the store command wouldn't work
resulting in an error like "is not the name of a series".
I checked the source to see what I'm missing but it seems store command on
accept series data, not scalars:
if (!ok && cmd->err == 0) {
if (gretl_is_scalar(s) || gretl_is_matrix(s)) {
gretl_errmsg_sprintf(_("'%s' is not the name of a series"), s);
cmd->err = E_DATATYPE;
} else {
gretl_errmsg_sprintf(_("'%s' is not the name of a variable"), s);
cmd->err = E_UNKVAR;
}
http://gretl.sourcearchive.com/documentation/1.9.6-1/interact_8c_source.html
Some recommendations on previous posts don't work for me either. Like
outfile. http://lists.wfu.edu/pipermail/gretl-users/2009-June/003339.html
Since the book has such an example, I conclude that store command
used to accept the scalars to set in a series, but later this
functionality was removed.
So, any help is appreciated. How can I treat a set of scalars like a
series in order to run statistical operators on (like max, min, avg,
and more) ?
Best regards,
Bulent Erdemir
12 years, 5 months

Re: [Gretl-users] Data problem
by clarodina clarodina

HI Allin,
There are 1000 rows on the csv file. The program does not allow date not
conforming to the calendar? Atlernative ways to retain the existing date
without restructuring? Tks
12 years, 5 months

AR(7)-GARCH(1,1)-t Roots
by Daniel Bencik

Dear all,
I tried to google on the internet what the inverted roots problem is, as you recently told me about the ARMA-GARCH problem I had.
Following up our discussion, the "best" model for my problem (under given circumstances) is AR(7)-GARCH(1,1)-t but the common inverse roots show up again. Can you please tell me what this means?
The Eviews estimation result is http://eubie.sweb.cz/gretl_forum/ar7.PNG
Thank you,
Daniel
12 years, 5 months

Possible bug - Windows narrator is triggered in Command log windows
by Bulent Erdemir

Hi,
Is it just me or in the command log windows, when one presses Ctrl-A to
select all text, Windows Narrator kicks in and starts reading the text in
the window ?
Annoying especially if there's too much text in the log history because you
cannot cancel narration, nor continue using gretl until all text is read.
Best regards,
Bulent Erdemir
12 years, 5 months

Data problem
by clarodina clarodina

Trying to import csv file
The file structure is
Date
2/11/2012 0.00165
2/15/2012 0.01215
2/16/2012 0.00126
But the program gives
"label strings can't be consistent dates
treating these as undated data"
Choosing restructure the file with time series would alter the existing
date
Another question is what is the command to layer many series on gnuplots
ignoring the scaling or display other series scale on right or left axis
12 years, 5 months