First of all thank to all of you Sven, Riccardo and Ignacio
I could fix the problem.
Would it be possible to create a database with scripts so that people can
have access to fixed scripts which would be of great help for beginners.
Please find below the output of my simulation. It is not clear to me why I
get U = 0 for the first three observations (1-3). Below the script you'll
find my calculations done manually with different results. Attached the
Excel-file with my calculations.
Best regards
Raul
_______________________________________
# Defines length of time-series
? nulldata 20
periodicity: 1, maxobs: 20
observations range: 1 to 20
? setobs 1 1 --time-series
Full data range: 1 - 20 (n = 20)
# build stationary AR(3) error process for u ?
scalar rho1 = 0.5 Generated scalar rho1 = 0.5 ?
scalar rho2 = -0.3 Generated scalar rho2 = -0.3 ?
scalar rho3 = 0.2 Generated scalar rho3 = 0.2 ?
series u = 0 Generated series u (ID 2) ?
series e = normal() Generated series e (ID 3) ?
u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e Replaced series u (ID 2) ?
print u e
u:
Full data range: 1 - 20 (n = 20)
0.000000 0.000000 0.000000 0.736134 0.389876 0.0831032 1.27225
0.296186 0.153867 -0.603212 -1.03987 -0.125745 1.05383 1.36702
1.38835 1.15469 0.0756820 0.396671 -0.373264 -0.802060
e:
Full data range: 1 - 20 (n = 20)
-0.191291 1.79901 0.222606 0.736134 0.0218093 0.109005 1.20043
-0.392982 0.370828 -0.845739 -0.751339 0.182452 0.925386 1.01036
1.04614 0.659854 -0.358562 0.427566 -0.779833 -0.511563
_____________________________________________________________
My calculations
U e
t-3 0
t-2 0
t-1 0
0 -0.191291 -0.191291
t+1 1.7033645 1.79901
-----Urspr?ngliche Nachricht-----
Von: gretl-users-bounces(a)lists.wfu.edu
[mailto:gretl-users-bounces@lists.wfu.edu] Im Auftrag von
gretl-users-request(a)lists.wfu.edu
Gesendet: Freitag, 10. Juli 2015 18:00
An: gretl-users(a)lists.wfu.edu
Betreff: Gretl-users Digest, Vol 102, Issue 3
Send Gretl-users mailing list submissions to
gretl-users(a)lists.wfu.edu
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.wfu.edu/mailman/listinfo/gretl-users
or, via email, send a message with subject or body 'help' to
gretl-users-request(a)lists.wfu.edu
You can reach the person managing the list at
gretl-users-owner(a)lists.wfu.edu
When replying, please edit your Subject line so it is more specific than
"Re: Contents of Gretl-users digest..."
Today's Topics:
1. generate AR (Raul Gimeno)
2. Re: generate AR (Sven Schreiber)
3. Re: generate AR (Riccardo (Jack) Lucchetti)
4. Re: generate AR (Ignacio Diaz-Emparanza)
----------------------------------------------------------------------
Message: 1
Date: Fri, 10 Jul 2015 09:46:51 +0200
From: "Raul Gimeno" <mrexito(a)vtxmail.ch>
To: <gretl-users(a)lists.wfu.edu>
Subject: [Gretl-users] generate AR
Message-ID: <003101d0bae4$95777c50$c06674f0$(a)vtxmail.ch>
Content-Type: text/plain; charset="us-ascii"
Hello
I would like to generate AR, MA and ARMA processes. Is there any function
available to do so?
Would it be possible to include in the GRETL guide a note on how to generate
simple time series? This could be of great help for beginners.
I've tried to generate an AR(3) with the following script which doesn't
work. Thank you for your help.
Raul
# seed
set seed 89675430
# Generate an AR(3) process
scalar rho1 = 0.5
scalar rho2 = -0.3
scalar rho3 = 0.2
loop 1000
# build stationary AR(3) error process for u
series u = 0
series e = normal()
u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e
endloop
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<
http://lists.wfu.edu/pipermail/gretl-users/attachments/20150710/9b51a080/at
tachment-0001.html>
------------------------------
Message: 2
Date: Fri, 10 Jul 2015 14:59:27 +0200
From: Sven Schreiber <svetosch(a)gmx.net>
To: gretl-users(a)lists.wfu.edu
Subject: Re: [Gretl-users] generate AR
Message-ID: <559FC1AF.9050707(a)gmx.net>
Content-Type: text/plain; charset=windows-1252
Am 10.07.2015 um 09:46 schrieb Raul Gimeno:
Hello
I would like to generate AR, MA and ARMA processes. Is there any
function available to do so?
There is 'varsimul' which you could use also univariate AR, but it's
probably not the best way for your problem. Apart from that, specifying the
data-generating process like you tried below is the right approach.
Would it be possible to include in the GRETL guide a note on how to
generate simple time series? This could be of great help for beginners.
I?ve tried to generate an AR(3) with the following script which
doesn?t work. Thank you for your help.
"doesn't work" is a typical but almost useless component of problem
reports.
Please copy&paste the error message you're getting.
# build stationary AR(3) error process for u
series u = 0
series e = normal()
u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e
This already looks quite good. Perhaps you don't have a dataset in place?
Again, report your error message.
-sven
------------------------------
Message: 3
Date: Fri, 10 Jul 2015 15:09:33 +0200 (CEST)
From: "Riccardo (Jack) Lucchetti" <r.lucchetti(a)univpm.it>
To: Gretl list <gretl-users(a)lists.wfu.edu>
Subject: Re: [Gretl-users] generate AR
Message-ID: <alpine.DEB.2.20.1507101509140.17956(a)ec-4.econ.univpm.it>
Content-Type: text/plain; charset="iso-8859-15"; Format="flowed"
On Fri, 10 Jul 2015, Raul Gimeno wrote:
Hello
I would like to generate AR, MA and ARMA processes. Is there any
function available to do so?
Would it be possible to include in the GRETL guide a note on how to
generate simple time series? This could be of great help for beginners.
Section 16.2
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Universit? Politecnica delle Marche
(formerly known as Universit? di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
------------------------------
Message: 4
Date: Fri, 10 Jul 2015 15:53:00 +0200
From: Ignacio Diaz-Emparanza <ignacio.diaz-emparanza(a)ehu.eus>
To: gretl-users(a)lists.wfu.edu
Subject: Re: [Gretl-users] generate AR
Message-ID: <559FCE3C.8080100(a)ehu.eus>
Content-Type: text/plain; charset=windows-1252; format=flowed
El 10/07/15 a las 09:46, Raul Gimeno escribi?:
Hello
I would like to generate AR, MA and ARMA processes. Is there any
function available to do so?
Would it be possible to include in the GRETL guide a note on how to
generate simple time series? This could be of great help for beginners.
I?ve tried to generate an AR(3) with the following script which
doesn?t work. Thank you for your help.
Raul
For simulated data you need to inform gretl the length of your time series,
with the first command
'nulldata 200'
For example this reserves space for series with 200 obs.
It may be useful also to inform that you plan to generate "time series"
this may be done with the command 'setobs' in this way:
'setobs 1 1 --time-series'
the first number is the seasonal periodicity (1 if you are making simulated
data) the second one determines which is the first observation. The
parameter --time-series makes posiible to use some gretl features specific
for time series.
Your script with these two commands works here.
# seed
set seed 89675430
# Generate an AR(3) process
scalar rho1 = 0.5
scalar rho2 = -0.3
scalar rho3 = 0.2
loop 1000
# build stationary AR(3) error process for u
series u = 0
series e = normal()
u = rho1*u(-1) + rho2*u(-2) + rho3*u(-3) + e
endloop
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
--
Ignacio D?az-Emparanza
Departamento de Econom?a Aplicada III (Econometr?a y Estad?stica)
Universidad del Pa?s Vasco - Euskalherriko Unibertsitatea, UPV/EHU
Tfno: (+34) 94 601 3732
http://www.ehu.eus/ea3
------------------------------
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
End of Gretl-users Digest, Vol 102, Issue 3
*******************************************
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AR(3).xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 8933 bytes
Desc: not available
URL:
<
http://lists.wfu.edu/pipermail/gretl-users/attachments/20150711/fd3521f0/at
tachment-0001.xlsx>
------------------------------
Message: 2
Date: Sat, 11 Jul 2015 11:00:52 +0200
From: Sven Schreiber <svetosch(a)gmx.net>
To: gretl-users(a)lists.wfu.edu
Subject: Re: [Gretl-users] Gretl-users Digest, Vol 102, Issue 3
Message-ID: <55A0DB44.1040905(a)gmx.net>
Content-Type: text/plain; charset=windows-1252
Am 11.07.2015 um 10:10 schrieb Raul Gimeno:
First of all thank to all of you Sven, Riccardo and Ignacio
I could fix the problem.
Would it be possible to create a database with scripts so that people
can have access to fixed scripts which would be of great help for
beginners.
Menu: File -> script files -> exercise files (or Castilian or Basque
translation thereof)
Please find below the output of my simulation. It is not clear to me
why I get U = 0 for the first three observations (1-3). Below the
script you'll find my calculations done manually with different results.
only the numbering of the first 3 are different. Where do you expect gretl
to store the t-1/ t-2 / t-3 starting values if not at the beginning? Does
your excel sheet say "t-1" for the 3rd row or column?
(no, of course not)
cheers,
sven
------------------------------
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
End of Gretl-users Digest, Vol 102, Issue 4
*******************************************