On Wed, 29 Aug 2012, huugh(a)centrum.cz wrote: > Hi, > is there a way how to reference a separate time observations for a given time > series in gretl? > > For example, if I wish to compute a "recession" dummy, i.e. an indicator > with 1, if in the two last periods there were negative growth rates and > 0 otherwise? > > > E.g. let's have this time series called X (below is some data, with the > obs. number and growth rate)
[...] <hansl> series gro = ldiff(X) series rec = (gro<0) && (gro(-1)<0) </hansl> HTH -------------------------------------------------- Riccardo (Jack) Lucchetti Dipartimento di Economia Università Politecnica delle Marche (formerly known as Università di Ancona) r.lucchetti(a)univpm.it http://www2.econ.univpm.it/servizi/hpp/lucchetti --------------------------------------------------