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