From ignacio.diaz-emparanza@ehu.es Fri Feb 12 13:34:19 2010 From: Ignacio Diaz-Emparanza To: gretl-devel@gretlml.univpm.it Subject: Re: [Gretl-devel] ema, obs and optional parameter Date: Fri, 12 Feb 2010 19:34:13 +0100 Message-ID: <1265999653.2304.50.camel@U001082.ehu.es> In-Reply-To: 1265998710.2304.41.camel@U001082.ehu.es MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8835826049935379588==" --===============8835826049935379588== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit > Oh! you got it by accident. Try this other initial value for s1: > > > 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 --===============8835826049935379588==--