Page 1 of 1

Copying data from one dated panel to another

Posted: Thu Oct 23, 2014 2:43 pm
by morak5
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

Re: Copying data from one dated panel to another

Posted: Thu Oct 23, 2014 3:11 pm
by EViews Chris
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)

Re: Copying data from one dated panel to another

Posted: Thu Oct 23, 2014 3:12 pm
by EViews Chris
Make that:

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

Re: Copying data from one dated panel to another

Posted: Thu Oct 23, 2014 3:21 pm
by morak5
It works perfectly! Many thanks, Chris.