Hi,
Is there a way to rank elements in a particular column of a table? I went through the rank and sort functions available within eviews. However, was not able to implement the same for a table.
My end requirement is to rank the data series based on the period of observation. Kindly help. I'm also adding the codes I used to find the first period of observation and last period of observation for the variables in the group.
I.e when we use the below codes, I need to rank the data in the 4th and 5th columns of the table named date.
group all *
all.drop resid
%name =""
table date
date(1,1)= "Series Name"
date(1,2)= "Series Strt Date"
date(1,3)= "Series End Date"
date(1,4)= "Start_Datenum"
date(1,5)= "End_Datenum"
for !i=1 to all.@count
%name = all.@seriesname(!i)
%smpl_first= {%name}.@first
%smpl_last= {%name}.@last
!date_st= @dateval(%smpl_first)
!date_end= @dateval(%smpl_last)
date(!i+1,1) = %name
date(!i+1,2)= %smpl_first
date(!i+1,3)= %smpl_last
date(!i+1,4)= !date_st
date(!i+1,5)= !date_end
next
sorting/ ranking the data in a table
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13315
- Joined: Tue Sep 16, 2008 5:38 pm
Re: sorting/ ranking the data in a table
Unfortunately there is no table sort routine. You would have to put the data into a matrix and sort it there. The TTOM function would be useful.
Follow us on Twitter @IHSEViews
Re: sorting/ ranking the data in a table
serves the purpose. Thanks Gareth
Who is online
Users browsing this forum: No registered users and 20 guests