Copying data from one dated panel to another

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

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

morak5
Posts: 16
Joined: Thu Jan 16, 2014 2:19 pm

Copying data from one dated panel to another

Postby morak5 » Thu Oct 23, 2014 2:43 pm

Hi,

I have one dataset saved in a dated panel with cross-section id structured as "XXX_YYY" (XXX-country code, YYY-industry code) over 1970-2010, and another dataset in a dated panel over 1960-2010 with cross-id "XXX". What I'm trying to do is copying the data in the second panel into the first one. The copied series would have the same data across industries but different across countries. I guess the challenge is to create a cross-id series in the second panel that also has the form XXX_YYY so that I can simply match-merge into the first one.

Is there a quick way of doing this? Any tip would be much appreciated.

Thanks,
Morak5

EViews Chris
EViews Developer
Posts: 161
Joined: Wed Sep 17, 2008 10:39 am

Re: Copying data from one dated panel to another

Postby EViews Chris » Thu Oct 23, 2014 3:11 pm

Unless I'm missing something, couldn't you just generate an extra series in the first panel containing only the country code for each observation and then match merge in the series from the second panel using the new country series as the destination id series?

You should be able to use any series you want for matching ids if you select 'General Match Merge' criteria when copying the series.

To strip off the part of the identifier before the underscore, you could use an expression like:
alpha xxx = @left(a,@instr(xxx_yyy,"_")-1)

EViews Chris
EViews Developer
Posts: 161
Joined: Wed Sep 17, 2008 10:39 am

Re: Copying data from one dated panel to another

Postby EViews Chris » Thu Oct 23, 2014 3:12 pm

Make that:

alpha xxx = @left(xxx_yyy,@instr(xxx_yyy,"_")-1)

morak5
Posts: 16
Joined: Thu Jan 16, 2014 2:19 pm

Re: Copying data from one dated panel to another

Postby morak5 » Thu Oct 23, 2014 3:21 pm

It works perfectly! Many thanks, Chris.


Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 29 guests