How to make program advance one obs sideways
Posted: Tue Aug 18, 2009 9:59 am
Hi,
I have a program and I am trying to do a calculation on a dataset that increases by one obs for each series. My question is how to make eviews advance sideways on a set of series. For example, the first two series have 20 and 21 obs, respectively. The third has 22, the fourth has 23, etc. I want to perform a calculation first on series 1and 2. Then on series 1,2,and 3. Then on 1,2,3, and 4. etc.
The way I have it now is not allowing the data set to grow by adding a new series "sideways" as desired. Any suggestions would be much appreciated. Thanks!
for !i = 1 to !length-1-!window
'set sample to estimation period for xxx series
smpl 1971:01 1971:01+!window-1+!i-1
!n = @obs(xxx_25)
'find the largest number of series with #obs at least equal to window and make program add a series each time
!k = 0
for !j = 2 to 25
if (@obs(xxx_!j) >= !window) then
!k = !j
endif
next
I have a program and I am trying to do a calculation on a dataset that increases by one obs for each series. My question is how to make eviews advance sideways on a set of series. For example, the first two series have 20 and 21 obs, respectively. The third has 22, the fourth has 23, etc. I want to perform a calculation first on series 1and 2. Then on series 1,2,and 3. Then on 1,2,3, and 4. etc.
The way I have it now is not allowing the data set to grow by adding a new series "sideways" as desired. Any suggestions would be much appreciated. Thanks!
for !i = 1 to !length-1-!window
'set sample to estimation period for xxx series
smpl 1971:01 1971:01+!window-1+!i-1
!n = @obs(xxx_25)
'find the largest number of series with #obs at least equal to window and make program add a series each time
!k = 0
for !j = 2 to 25
if (@obs(xxx_!j) >= !window) then
!k = !j
endif
next