Dated data table- sample

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

Dated data table- sample

Postby tvonbrasch » Fri Sep 16, 2016 6:43 am

Hi

I have a quarterly workfile and I want to create a dated data table so that annual series are shown every fifth year, e.g.
table.JPG
table.JPG (11.79 KiB) Viewed 3669 times
How can I do this?

Thomas

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Dated data table- sample

Postby EViews Jason » Fri Sep 16, 2016 9:23 am

There is no native way to do it. You will have to freeze the dated data table into a table and then manually remove the columns.

This isn't the most sophisticated bit of code but gets the job done.

Code: Select all

'for an annual workfile where the last observation ends in 0 or 5 (ex: 1990 or 1995) freeze(mytable, mode=overwrite) group01.dtable for !i=@obsrange to 0 step -1 if(@mod(@obsrange-!i,5)<>0) then !col = !i+1 mytable.deletecol(!col) endif next

tvonbrasch
Posts: 569
Joined: Fri Apr 15, 2011 5:35 am

Re: Dated data table- sample

Postby tvonbrasch » Sun Sep 18, 2016 10:19 pm

Hi

okey, thanks for this code!
Thomas


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests