combining 2 series into one

For questions regarding programming in the EViews programming language.

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

lenka
Posts: 10
Joined: Wed Jun 05, 2013 8:29 am

combining 2 series into one

Postby lenka » Wed Jun 19, 2013 7:30 am

Hello again,
I have a panel of country level data over a certain time period.
I am running the regression for 2 subsets of countries, e.g. ASIA and EUROPE.
I keep the (frozen) equations in 2 pages: ASIA_page and EUROPE_page. On these pages I have my forecast variable Y_hat for ASIA and EUROPE forecast.
I would like to combine these two forecasts into one variable, in a new page WORLD (so that I can then export this result to excel)
In other words, how can I combine two series in 2 different pages into one?
Thanks,
Lenka

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

Re: combining 2 series into one

Postby EViews Gareth » Wed Jun 19, 2013 8:00 am

Create the world page as a panel, with two cross-sections (ASIA and EUROPE). Copy the series over from each page to the world page, using date and continent as id variables.

lenka
Posts: 10
Joined: Wed Jun 05, 2013 8:29 am

Re: combining 2 series into one

Postby lenka » Wed Jun 19, 2013 12:26 pm

thank you, I'll give it a try

lenka
Posts: 10
Joined: Wed Jun 05, 2013 8:29 am

Re: combining 2 series into one

Postby lenka » Thu Jun 20, 2013 2:53 am

Hi, the problem is that the resulting series get overwritten in the process.

y_hat for ASIA contains NA's for EUROPE and vice versa.
So when I copy:
copy EUROPE\f_diesel SUMMARY\
copy ASIA\f_diesel SUMMARY\f_diesel @src @date region @dest @date region
EUROPE portion of f_diesel gets overwritten by NA's

I tried to put a merge option into copy command:
copy (merge) ASIA\f_diesel SUMMARY\f_diesel @src @date region @dest @date region
but I am getting an error "invalid ID list"

I was trying to modify the ID list, include cross-section identifier, but doesn't work

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

Re: combining 2 series into one

Postby EViews Gareth » Thu Jun 20, 2013 8:18 am

Could you provide the workfile.

lenka
Posts: 10
Joined: Wed Jun 05, 2013 8:29 am

Re: combining 2 series into one

Postby lenka » Tue Jun 25, 2013 1:49 am

I am attaching an excerpt of a workfile, plus the program I am trying to run.
Attachments
demand_all.wf1
(139.5 KiB) Downloaded 315 times
merge_forecast.prg
(180 Bytes) Downloaded 465 times

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

Re: combining 2 series into one

Postby EViews Gareth » Tue Jun 25, 2013 7:58 am

You have spaces between the merge command and its options.

lenka
Posts: 10
Joined: Wed Jun 05, 2013 8:29 am

Re: combining 2 series into one

Postby lenka » Tue Jun 25, 2013 8:28 am

ouch, that was easy
may thanks!

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

Re: combining 2 series into one

Postby EViews Gareth » Tue Jun 25, 2013 8:44 am

You're not the first, you won't be the last :wink:


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests