Page 1 of 1

Sum of time series

Posted: Fri Jun 17, 2011 11:30 pm
by marcsean
Hello,
I have problems creating time series.
Here is the setup:

K is a variable and l runs from 1 to K.
With this notation, I have created the series h{!K}{!j}.
E.g. K=2: Series being created are h11 and h21 h22.
Now I want to create H{!K} = (1/{!K})*???
Here is an example
E.g. K=2 H1= 1/1 * h11
H2= 1/2 * (h21+h22)
Herein is my problem: How do I create this sum / the sum of two time series?
K and l are defined within the programm.
Thank You!

Sum of time series

Posted: Sat Jun 18, 2011 1:30 am
by EViews Gareth
Put them in a group and then use @rsum

Re: Sum of time series

Posted: Sat Jun 18, 2011 4:32 am
by marcsean
The second step comprehensible.
Is there any possibility to create the groups dynamically and not each for itself?
group g1 containing h11
group g2 containing h21 h22
group g3 containing h31 h32 h33
up to group gm containing hm1 …. hmm? (m varies)
Is there a procedure to add series to a group? with the group series1 series2 command it appears to be quite complicated

Re: Sum of time series

Posted: Sat Jun 18, 2011 10:14 am
by EViews Gareth
group.add

Re: Sum of time series

Posted: Sun Jun 19, 2011 2:05 am
by marcsean
Thank you, it worked fine!

Just one further question:
Is there any possibility to extract a certain value from a series?
E.g. I want to have the fifth value of a series and work with it like a number in order to generate further series by arithmetic operations.
E.g. name fith value of series 1 a; series 2 = a*series1.

Sum of time series

Posted: Sun Jun 19, 2011 8:43 am
by EViews Gareth
Use the @elem function