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
Deterministic trend in VAR
by Muheed Jamaldeen
Hi all,
Just a general VAR related question. When is it appropriate to include
a deterministic time trend in the reduced form VAR? Visually some of the
data series (not all) look like they have trending properties. In any case,
does the inclusion of the time trend matter if the process is stable and
therefore stationary (i.e. the polynomial defined by the determinant of the
autoregressive operator has no roots in and on the complex unit circle)
without the time trend term. Other than unit root tests, is there a better
way to test whether the underlying data generating process has a stochastic
or deterministic process?
I am mainly interested in the impulse responses.
Cheers,
Mj
12 years, 7 months
Error 12 calling gretl_read_native_data
by Filippo Bonsignori
Hello gretl users!
I'm trying to open a ".gdt" file calling gretl_read_native_data (system
info's: "gretl 1.9.6 - build date 2011-10-17" on "Windows 7 Ultimate -
Service Pack 1") from a C# class: the result is always an error code 12 (it
seems that something is wrong into the file path name ...).
Follows a significant excerpt of my code
[Start C# code]
...
IntPtr dset;
[DllImport(@"C:\Program Files (x86)\gretl\libgretl.dll")]
internal static extern void libgretl_init();
[DllImport(@"C:\Program Files (x86)\gretl\libgretl.dll")]
internal static extern IntPtr create_new_dataset(IntPtr pZ, int nvar, int
nobs, int markers);
[DllImport(@"C:\Program Files (x86)\gretl\libgretl.dll", CharSet =
CharSet.Unicode)]
internal static extern int gretl_read_native_data(string fname, IntPtr
pdset);
...
int err;
string fname = @"C:\Program Files (x86)\gretl\data\misc\australia.gdt";
libgretl_init();
dset = datainfo_new();
err = gretl_read_native_data(fname, dset);
...
[End C# code]
Where am I wrong?
Regards, Filippo.
12 years, 8 months
PROBLEMAS_CON_GRETL
by Hebert Suárez Cahuana
Estimados:
Tengo un problema recurrente que no tenía con las versiones anteriores a la
1.9.6, consiste en que instalo y ejecuto la versión 1.9.7 y no puedo abrir
un archivo puesto que el programa se cierra, con el siguiente mensaje en la
consola:
hebert@hebert-desktop:~$ gretl
Instrucción ilegal
hebert@hebert-desktop:~$
Me recomendaron instalar con la opción
./configure --disable-sse2
make
make check
make install
Es un problema que inutiliza por completo el programa, utilizo el ubuntu
10.04.
Les agradecería mucho si me ayudaran a solucionar este problema.
Hebert Suarez Cahuana
Perú
--
Atentamente:
Hebert Suárez Cahuana
Departamento Académico de Economía
Escuela Profesional de Economía
Universidad Nacional de San Agustín
Av. Venezuela S/N Cercado
www.unsa.edu.pe
Arequipa-Peru
Telefono 51 54 215105
E-mail: hsuarezc(a)unsa.edu.pe
12 years, 8 months
VAR model and forecast
by alexkakashi@libero.it
Hi,
I have two questions about the parameters of the VAR models. Let us (X,Y) a
bivariate time series and consider a VAR(1). I use
system method=sur
equation X const X(-1) Y(-1)
equation Y const X(-1) Y(-1)
end system
I have two questions. The first: can I save the parameter of X(-1) of the
first equation? I should use it in a bootstrap procedure.
The second: I'd like forecast the variables X, so I have used the
fcast --out-of-sample --static X
Can I save this forecasts in a new variable?
Thanks.
Best regards.
Alessandro
12 years, 8 months
Ralph M Rodriguez/PO/KAIPERM is out of the office.
by Ralph.M.Rodriguez@kp.org
I will be out of the office starting 12/27/2011 and will not return until
01/03/2012.
Hi All, I will be out of the office on PTO from Tuesday Dec 27 returning to
the office Tuesday Jan 3, 2012. I will not be cheking emails during this
time. But, if you have an immediate concern with Cost Model, email
CM-Help(a)kp.org or contact Bradley Njus at 510 625 4595.
Thanks, and have a great holiday season with your loved ones.
Ralph
12 years, 8 months
Saving forecast uhat and rolling t
by clarodina@lycos.com
Hi,
Is there some ways to save the forecast value? The manual mention about saving forecast to be written
How to have rolling t value? Using smpl +1 +1 and ols v1 v2 might do the task but have many other outputs. Tks
12 years, 8 months
how to install textbook data in a Win7 computer?
by Qi Shi
hi,
I installed gretl and a textbook data, say stock-watson2, in my Win7
computer, but when i open gretl, there is no such a data button in the
sample data. who can tell me how to fix it? thanks
best regards
--
shi, qi
12 years, 8 months
panel plots
by Leon Unger
Hi there,
the (relatively) new panel plots are a great means!
I have some questions about them:
- is it possible to use script commands to generate them? (besides
boxplots)
- at least for first option plotting two or more 'series' in one
diagram would be interesting, too. What do you think?
Best
Leon
12 years, 8 months