Oh! you got it by accident. Try this other initial value for s1:
<script>
open data3-6
series y = Ct
series s1 = 0
scalar d = 0.5
s1 = (obs=1) ? y[1] : d*y+ (1-d)*s1(-1)
print y s1 -o
</script>
Sorry, I probably had to explain this a litle more.
With periodicity ($pd)> 1 (quarterly or monthly data,..)
y[1] is refering to the first observation of the series,
but with annual data it is refering to the observation of year '1'.
For example in data3-6.gdt the first value of series Ct is Ct(1959)
so if you want to put the initial value of s1, in the previous script,
to the first observation of Ct the command has to be:
s1 = (obs=1959) ? y[1] : d*y+ (1-d)*s1(-1)
and I think it should be better that the behaviour of the 'obs' function
be the same as with $pd>1, such that 'obs=1' points to the first
observation in the available data.
--
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