Allin,
I am teaching on these days a very basic course on forecasting.
A part of the course is about smoothing models so I was looking at
exponential smoothing and today I was also preparing a script about the
Brown models for linear and quadratic local trends.
I would like to report some small problems I found:
1- The exponential moving average exist only at the GUI but there is not
an equivalent command script for that. I had to prepare a user function.
2- When I finished to prepare a first version of this function I noticed
that it only worked for quarterly data ( I suppose monthly as well ) but
not for annual data. The problem was about the different behaviour of
the 'obs' function with annual data (I saw this in the manual for
'genr'). If you use, for example,
series s1 = (obs=1) ? y[1] : delta*y+ (1-delta)*s1(-1)
this will work for quarterly or monthly data, but not in the same way
for annual data. Finally I found a solution, but it implied that my
script grew up in 10 lines!
Don't you think that 'obs' should work in the same way, idependently of
the value of $pd?
3- Finally I saved my Brown function as a function package ( I uploaded
it to the server as well), but I see another small problem: my main
function returns a list and if one wants the package to work ok this
list is mandatory, but the dialog box says "Assign return value
(optional)". ¿is there any way to change this to 'required'?
--
Ignacio Diaz-Emparanza
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
UPV/EHU
Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
T.: +34 946013732 | F.: +34 946013754
www.ea3.ehu.es