From ignacio.diaz-emparanza@ehu.es Mon Feb 15 04:57:49 2010 From: Ignacio Diaz-Emparanza To: gretl-devel@gretlml.univpm.it Subject: Re: [Gretl-devel] ema, obs and optional parameter Date: Mon, 15 Feb 2010 10:57:45 +0100 Message-ID: <1266227865.2244.34.camel@U001082.ehu.es> In-Reply-To: Pine.A41.4.58.1002121338500.3104998@f1n11.sp2net.wfu.edu MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5010867387936901044==" --===============5010867387936901044== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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: > > > > 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: obs Output: series Returns a series of consecutive integers, setting 1 at the start of the dataset. Note that the result is invariant to subsampling. This function is especially useful with time-series datasets. Note: you can write t instead of obs with the same effect. See also obsnum. This definition does not seems to be totally correct given the different behaviour of 'obs' for annual data. I agree with Sven in that sometimes it is not clear if we are treating with a number or with a string. I also agre with Helio's suggestion of separating the string (obs.year) and the number (obs) of each observation entry. I was thinking that to have a notation consistent for all the periodicities It would be better to use 'obs.date' to note the string of the date and 'obs' for the integer index, but now I see that 't' is already working always as integer entry, so the solution may be: 1- to define "obs.date" as (only) the string of the date and leaving 'obs' as it is now (to avoid backward incompatibilities, and deprecate in the future), or 2- as 'obs' works as 'obs.date' for annual data, and for monthly or seasonal data is already detected as string when writing the date label, we don't need a new function, we only need that a litle paragraph about the different behaviour of the 't' function be added to the 'genr' entry in the manual. (But yes, Sven, we are maintaining the mixture of strings and numbers in 'obs' in this case) -- 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 --===============5010867387936901044==--