On Fri, 12 Feb 2010, Ignacio Diaz-Emparanza wrote:
El vie, 12-02-2010 a las 12:47 -0500, Allin Cottrell escribió:
> Hmm, what does the dataset look like? The following works
> correctly here:
>
> <script>
> open data3-6
> series y = Ct
> series s1 = y[1]
> scalar d = 0.5
> s1 = (obs=1) ? y[1] : d*y+ (1-d)*s1(-1)
> print y s1 -o
> </script>
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>
The output still looks OK to me, though maybe I'm missing
something. What output are you getting?
Allin.