Is it possible to create a group that is dependent on certain characteristics of the time series? For example, say I have 100 series, but I just want to take the 10 series with the highest value in the observation of its time series.
Thanks!
Programming a group that is observation dependent?
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Programming a group that is observation dependent?
Not really.
For some statistics, you could put the 100 into a group then reorder that group (using group.reorder - documentation isn't available, but if you open the group, then click on View->Group Members, then hit the order button, you can see the command capture) by some statistic, then take the first 10 members of the reordered group and put them in a new group.
For some statistics, you could put the 100 into a group then reorder that group (using group.reorder - documentation isn't available, but if you open the group, then click on View->Group Members, then hit the order button, you can see the command capture) by some statistic, then take the first 10 members of the reordered group and put them in a new group.
Follow us on Twitter @IHSEViews
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Programming a group that is observation dependent?
Code: Select all
create u 100
for !i=1 to 100
series x!i=nrnd
next
group g x*
g.reorder @mean
group bestmeans
for !i=1 to 10
bestmeans.add g(!i)
next
Follow us on Twitter @IHSEViews
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Programming a group that is observation dependent?
thanks for the work around suggestion. In eviews 11 Im getting this error: REORDER is not a valid view for G in "G.REORDER @MEAN"
on line 8.
on line 8.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13307
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Programming a group that is observation dependent?
It was added in ev12
Follow us on Twitter @IHSEViews
-
- Posts: 199
- Joined: Sun Mar 01, 2015 5:01 pm
Re: Programming a group that is observation dependent?
Thanks Gareth! I upgraded and it works!
Do you know if I could do something similar but instead of the mean I order by say the value for January 2020?
Edit: Sorry you said we cant do this, but we can order by the last observation... so I can use that and changing the sample. thanks!
Do you know if I could do something similar but instead of the mean I order by say the value for January 2020?
Edit: Sorry you said we cant do this, but we can order by the last observation... so I can use that and changing the sample. thanks!
Who is online
Users browsing this forum: No registered users and 23 guests