El lun, 15-02-2010 a las 10:57 +0100, Ignacio Diaz-Emparanza escribió:
El vie, 12-02-2010 a las 13:44 -0500, Allin Cottrell escribió:
> On Fri, 12 Feb 2010, Ignacio Diaz-Emparanza wrote:
>
> > 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'.
>
> Duh, sorry, I wasn't paying enough attention. I'll think about it,
> but here's a quick work-around:
>
> <script>
> open data3-6
> series y = Ct
> series s1 = 0
> scalar d = 0.5
> scalar T = $nobs
> loop t=1..T
> s1[t] = (t==1) ? y[t] : d*y[t]+ (1-d)*s1[t-1]
> endloop
> print y s1 -o
> </script>
>
> Allin
Oh, yes it works ! I did not try with 't' because I thought it was an
alias of 'obs', given the explanation in the function reference:
Sorry I am seeing I was absolutely confused about that. I didn't notice
that you were using a loop in 't'. In general in genr commands really
't' is an alias of 'obs'. So the problem persists also with 't'.
--
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