Hi everyone,
I have a workfile with several timeseries of various lengths. For example, one series could have entries from 2000/07 to 2010/06, another from 1995/07 to 2005/06 and so on. I would like to create groups including timeseries with entries between two specific dates. Timeseries with fewer observations should be excluded. None of the series have any gaps.
Setting the sample to a specific start and end date does not help either, since timeseries with fewer observations are still included.
Can anyone help? A code implementation would be appreciated unless there is a way to do this using sampling
Complete timeseries in group only
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Complete timeseries in group only
I think I would add every series to a group then loop through the members one at a time and check the number of obs. If too few, drop that series.
-
fboehlandt
- Posts: 83
- Joined: Thu Apr 15, 2010 3:54 am
Re: Complete timeseries in group only
Hello Gareth,
thanks for your reply. I got something like this
However, problem is that the number of series within the group changes dynamically (series being dropped). I need something like a do...while statement
thanks for your reply. I got something like this
Code: Select all
%strg = "cfp01"
!m = {%strg}.@count
for !i = 1 to !m
%n={%strg}.@seriesname(!i)
!n = {%n}.@obs
if !n < 60 then
{%strg}.drop {%n}
endif
next-
fboehlandt
- Posts: 83
- Joined: Thu Apr 15, 2010 3:54 am
Re: Complete timeseries in group only
never mind, I can do it using two groups
cheers
I suppose thats the easiest way of going about it. Thanks again%str1 = "cfp01"
%str2 = "cfp02"
group {%str2}
!m = {%str1}.@count
for !i = 1 to !m
%n={%str1}.@seriesname(!i)
!n = {%n}.@obs
if !n >= 60 then
{%str2}.add {%n}
endif
next
cheers
Who is online
Users browsing this forum: No registered users and 1 guest
