Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gravity Equation for Trade | Merging panel datasets

    Essentially: how to merge 2 dyadic panel datasets.


    Hi all,

    I have a dataset from CEPII (gravdata.dta) which I have cleaned up to contain only specific countries/years/variables.
    The gravdata dataset looks as follows:
    iso3_o iso3_d year distance gdp_o gdp_d etc... (many variables)
    AGO BDI 1994
    AGO BDI 1997
    AGO GMB 2006
    BDO SEN 1985
    BDO SEN 2006
    I'd like to merge this dataset with a dataset containing the bilateral trade between country pairs. I use data from the DOTS division of IMF.

    data looks as follows:
    Click image for larger version

Name:	Screen Shot 2020-01-03 at 17.10.25.png
Views:	1
Size:	113.0 KB
ID:	1530616





    I'm not sure if I have to use merge (and which one?) or joinby given that I need the country pairs to align as well as the years.
    Also, In one dataset I have data for all years running from 1985 to 2015 at 3-year intervals while the other dataset only has some of the values for corresponding years.

    Thanks for your help!
    Last edited by Alex Alain; 03 Jan 2020, 09:59.

  • #2
    Anyone can help?
    I'm really stuck with what's seems to me a super simple issue.
    I really need to get going on this project.

    Comment


    • #3
      Hi Alex,

      Please post an example of each data set using dataex. See the FAQ for information on how to do so.

      Comment

      Working...
      X