Creating an aggregate of single time series components

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

michi
Posts: 11
Joined: Thu Apr 18, 2013 7:48 am

Creating an aggregate of single time series components

Postby michi » Sat Jun 14, 2014 6:19 am

I'm working on some fdi analysis in the following workfile. As I have to concentrate on the NMS10 (BG CZ EE HU LT LV PL RO SK SI) I would like to generate an aggregate for the NMS10 in every workfile page as a "geo country" and "Partner country". Is there a possibility to do that in Eviews or will I have to do it by hand?
Attachments
visual_org.zip
(1.05 MiB) Downloaded 323 times

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

Re: Creating an aggregate of single time series components

Postby EViews Gareth » Mon Jun 16, 2014 8:57 am

Just so I am sure I understand - you currently have panels as your workfile pages. You want to add a new cross-section ID for those panels where the values are the sum of existing cross-section IDs?
Follow us on Twitter @IHSEViews

javiersan
Posts: 184
Joined: Mon Jan 19, 2009 8:18 am

Re: Creating an aggregate of single time series components

Postby javiersan » Mon Jun 23, 2014 9:24 am

Hi Gareth, I find this question interesting as well. Assuming that an additional ID is what is needed, how would you go about adding it? I could think about a way through unstacking the panel that seems too involved.
Javier

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

Re: Creating an aggregate of single time series components

Postby EViews Gareth » Mon Jun 23, 2014 10:20 am

Can be tricky. We think the best way to do it is to create an annual page with the sums that you want. Then import that page back into the original page. In this case, for the FGDP_OUT page:

Code: Select all

pagecreate(page=annual) a 1992 2012
series year = @date
copy(smpl=if @inlist(geo, "BG CZ EE HU LT LV PL RO SK SI")=1, c=sum) fgdp_out\fgdp_out annual\fgdp_out @src year @dest year
pagesave c:\temp\tempfile
pageselect fgdp_out
import(resize, mode=ms) c:\temp\tempfile @id @date(year) geo @destid @date(year) geo @genr geo="NMS10"
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 70 guests