On Sun, 16 Sep 2012, Data Analytics Corp. wrote: > Hi, > > I have a monthly time series of the Dow Jones Industrial Index beginning > 1928:10. I'd like to create a new variable that is just the month > number: 10, 11, 12, 1, 2, 3,.... How can I do this? I thought there > would be a month function in Gretl, but I don't see one. This question, > of course, extends to the year (1928, 1928, 1929, 1929,...) and quarter > if I have quarterly data.
Does this help? <hansl> open bjg.gdt series year = 1949 + floor((t-1)/12) series month = 1 + ((t-1)%12) </hansl> -------------------------------------------------- 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 --------------------------------------------------