Accessing specific values from a series
Posted: Sat Jun 27, 2009 6:45 am
Hi everyone,
I have a time series object called y3_0mp from which I want to access the the 397th, 400th, 403rd, and 406th value (and multiply them with each other). Afterwards reiterate the process with plus 1 values. This is what I have come up with so far:
for !j=0 to 206
series y12_eh_{!j}=(@elem(y3_0mp, @otod(397+{!j})))*(@elem(y3_0mp, @otod(400+{!j}))))*(@elem(y3_0mp, @otod(403+{!j})))*(@elem(y3_0mp, @otod(406+{!j})))
next
However it gives me the followin error message: "Illegal date 397+0". I also tried just the loop in there and it didn't work, any ideas???? I also tried to simply type in the date as it is and it didn't work.
Thanks,
Billaudes
I have a time series object called y3_0mp from which I want to access the the 397th, 400th, 403rd, and 406th value (and multiply them with each other). Afterwards reiterate the process with plus 1 values. This is what I have come up with so far:
for !j=0 to 206
series y12_eh_{!j}=(@elem(y3_0mp, @otod(397+{!j})))*(@elem(y3_0mp, @otod(400+{!j}))))*(@elem(y3_0mp, @otod(403+{!j})))*(@elem(y3_0mp, @otod(406+{!j})))
next
However it gives me the followin error message: "Illegal date 397+0". I also tried just the loop in there and it didn't work, any ideas???? I also tried to simply type in the date as it is and it didn't work.
Thanks,
Billaudes