Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: merge bilateral panel data


From   Andreas Dimopoulos <[email protected]>
To   <[email protected]>
Subject   st: merge bilateral panel data
Date   Thu, 03 Apr 2014 21:35:29 +0100

hello,

I am trying to merge two panel datasets where the one has each country for
different number of years and the relevant characteristics and another
dataset with pair of countries and their in-between trade. For example,

Dataset 1:

reporter      year var1 
Alb           2000 x1
Alb           2002 x2
.               .   .
.               .   .
.               .   .
Can           2000 X67
Can           2003 X68

My second dataset has again panel data but with pairs of countries

reporter partner year trade 

alb       arg     2003  k
alb       aus     2000  k1
alb       aus     2002  k2
.          .       .    .
.          .       .    .
.          .       .    .
can       ken     2000  m
can       ken     2004  m2

I tried to merge the data after I had used the command "sort". However,
stata said that reporter cannot uniquely identify observations which I
understand since I have the pairs of countries two, three,four  times etc.
depending on the years...Any ideas of how to merge?

Thanks a lot,
A
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index