Copy from workfile/databank to workfile

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

radmirer
Posts: 4
Joined: Thu Aug 11, 2016 2:44 am

Copy from workfile/databank to workfile

Postby radmirer » Thu Aug 11, 2016 3:23 am

Dear Team,

I want to create a new series(annual) out of specific data-points from other series(monthly).
So I do this in a while loop:

%year = @str(!year)
%yearm = @str(!year) + "M02"
series d_IPC_ann_02(!ind) = @elem(ipcn_forecast_errors::ipc_ann_{%yearm}, {%year}M12)

But when I do this, I get strange numbers which I can't find in any of my files.

Further:
series a1
series a1(1) = @elem(ipcn_forecast_errors::ipc_ann_2009m02, "2009m12")

This command gives also a wrong number, ie. not the number that is in ipc_ann_2009m02 at postion 2009m12. ( I can create the same wrong number in both commands if I specify %year)

and strangely this does not work at all (syntax error):
scalar a1 = @elem(ipcn_forecast_errors::ipc_ann_2009m02, "2009m12")


I tried both "stream" the data from a workfile and from a database, nothing worked. Thing is in another project these things worked well.

Edit: I found out that these strange numbers are averages over the hole year. So the question is how to transfer data from an monthly workfile to an annual workfile.

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13586
Joined: Tue Sep 16, 2008 5:38 pm

Re: Copy from workfile/databank to workfile

Postby EViews Gareth » Thu Aug 11, 2016 7:44 am

You'll have to control the frequency conversion by creating a link in your workfile to the data in the database, then use the @elem on that linked series.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 2 guests