Home > Community > General > Lags & changes > Antwort auf: Lags & changes

#9024
Tathagata GhoseTathagata Ghose
Mitglied

Hello,

Thanks for your reply. I’m still having problems translating the material from the help/manuals for my specific use.

E.g. you talk about extracting data and index operators. It is not yet clear to me how to use these to lag a data series. I don’t need to extract any values or change any values. What I need is that the values of the data series will appear against changed values of “time”. Let’s say, I lag a series by 6 months. Then, the data value that was originally against say, January 1980, will have to appear against July 1980.

How do I create this shift in the data? Also, I cannot do it month-by-month using a fixed index which references specific dates. It has to be an automatic method which updates as new data arrive.

I kind of get the idea that the ValueIndex operator will eventually get me there, but I’m not finding many examples where the index is used in a variable manner. Using a fixed index, I can easily extract from a data series, say, “the 60th value”, but how do I write “for every ‘time = t’, extract the ‘t-6’th value from the data series and put it against ‘t’ in a new data series”?

I just need one more concrete example, I think.

Thanks
Tatha