Announcement

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

  • First time using STATA, after merging three datasets

    I merged three different datasets using ReporterISO3 and PartnerISO3 as the common variable.
    The aim of my project is to be able to analyze the trade data between each country through multiple regressions and analyses, however before that can occur I need to make sure my dataset looks fine. In that, I mean that the dataset looks like what it should do. Here is a small sample, the dataset includes 50 variables and 87,147 observations.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str3(ReporterISO3 PartnerISO3) double TradeValuein1000USD byte ProductCode int Year byte colony long area str3 colonizer1
    "ARE" "ARG"  1332.831 35 2015 0 83657 "GBR"
    "ARE" "ARG"         0 37 2016 0 83657 "GBR"
    "ARE" "ARG"  3050.415 32 2014 0 83657 "GBR"
    "ARE" "ARG"     6.817 39 2015 0 83657 "GBR"
    "ARE" "ARG"     6.834 34 2015 0 83657 "GBR"
    "ARE" "ARG"    17.465 37 2014 0 83657 "GBR"
    "ARE" "ARG"  1240.241 38 2016 0 83657 "GBR"
    "ARE" "ARG"    99.958 31 2017 0 83657 "GBR"
    "ARE" "ARG"   257.662 34 2017 0 83657 "GBR"
    "ARE" "ARG"  3297.297 32 2015 0 83657 "GBR"
    "ARE" "ARG"   364.429 37 2015 0 83657 "GBR"
    "ARE" "ARG"  1562.481 32 2017 0 83657 "GBR"
    "ARE" "ARG"         0 31 2014 0 83657 "GBR"
    "ARE" "ARG"       .03 39 2016 0 83657 "GBR"
    "ARE" "ARG"    340.03 38 2015 0 83657 "GBR"
    "ARE" "ARG"   414.015 36 2015 0 83657 "GBR"
    "ARE" "ARG"   694.903 36 2014 0 83657 "GBR"
    "ARE" "ARG"  3101.022 38 2014 0 83657 "GBR"
    "ARE" "ARG"  5573.497 38 2017 0 83657 "GBR"
    "ARE" "ARG"    90.227 37 2017 0 83657 "GBR"
    "ARE" "ARG"      .815 39 2017 0 83657 "GBR"
    "ARE" "ARG"         0 39 2014 0 83657 "GBR"
    "ARE" "ARG"  1726.612 35 2014 0 83657 "GBR"
    "ARE" "ARG"    60.314 36 2017 0 83657 "GBR"
    "ARE" "ARG"   2412.85 32 2016 0 83657 "GBR"
    "ARE" "ARG"     9.762 33 2017 0 83657 "GBR"
    "ARE" "ARG"     4.901 33 2014 0 83657 "GBR"
    "ARE" "ARG"     1.906 33 2015 0 83657 "GBR"
    "ARE" "ARG"   138.003 36 2016 0 83657 "GBR"
    "ARE" "ARG"         0 31 2015 0 83657 "GBR"
    "ARE" "ARG"  2026.174 35 2016 0 83657 "GBR"
    "ARE" "ARG"         0 31 2016 0 83657 "GBR"
    "ARE" "ARG"   294.071 34 2014 0 83657 "GBR"
    "ARE" "ARG"     5.049 34 2016 0 83657 "GBR"
    "ARE" "ARG"  1796.042 35 2017 0 83657 "GBR"
    "ARE" "AUS" 21873.287 39 2017 0 83657 "GBR"
    "ARE" "AUS"  3331.293 33 2014 0 83657 "GBR"
    "ARE" "AUS"  8799.777 31 2014 0 83657 "GBR"
    "ARE" "AUS" 10990.287 34 2015 0 83657 "GBR"
    "ARE" "AUS" 51963.908 37 2014 0 83657 "GBR"
    "ARE" "AUS" 34609.657 38 2016 0 83657 "GBR"
    "ARE" "AUS" 15495.934 35 2014 0 83657 "GBR"
    "ARE" "AUS" 44604.106 38 2017 0 83657 "GBR"
    "ARE" "AUS"  6153.101 34 2014 0 83657 "GBR"
    "ARE" "AUS"  1141.412 33 2016 0 83657 "GBR"
    "ARE" "AUS" 74471.359 37 2017 0 83657 "GBR"
    "ARE" "AUS"    588.26 33 2015 0 83657 "GBR"
    "ARE" "AUS" 52496.789 36 2015 0 83657 "GBR"
    "ARE" "AUS" 25250.972 32 2014 0 83657 "GBR"
    "ARE" "AUS" 54779.975 38 2014 0 83657 "GBR"
    "ARE" "AUS"  2295.738 39 2014 0 83657 "GBR"
    "ARE" "AUS" 11827.888 35 2015 0 83657 "GBR"
    "ARE" "AUS" 18005.488 32 2016 0 83657 "GBR"
    "ARE" "AUS" 16110.613 37 2016 0 83657 "GBR"
    "ARE" "AUS"  8190.085 31 2015 0 83657 "GBR"
    "ARE" "AUS"  6003.509 31 2016 0 83657 "GBR"
    "ARE" "AUS" 20689.346 32 2017 0 83657 "GBR"
    "ARE" "AUS"   660.089 33 2017 0 83657 "GBR"
    "ARE" "AUS" 57214.336 36 2014 0 83657 "GBR"
    "ARE" "AUS" 27053.843 32 2015 0 83657 "GBR"
    "ARE" "AUS" 40478.104 37 2015 0 83657 "GBR"
    "ARE" "AUS"  64404.45 36 2016 0 83657 "GBR"
    "ARE" "AUS" 24724.751 38 2015 0 83657 "GBR"
    "ARE" "AUS" 20844.723 39 2015 0 83657 "GBR"
    "ARE" "AUS"  5616.818 31 2017 0 83657 "GBR"
    "ARE" "AUS" 59321.601 36 2017 0 83657 "GBR"
    "ARE" "AUS" 25584.051 39 2016 0 83657 "GBR"
    "ARE" "AUS" 19990.166 34 2017 0 83657 "GBR"
    "ARE" "AUS" 16306.953 35 2016 0 83657 "GBR"
    "ARE" "AUS" 31630.444 34 2016 0 83657 "GBR"
    "ARE" "AUS" 26634.023 35 2017 0 83657 "GBR"
    "ARE" "AUT"     9.832 36 2014 0 83657 "GBR"
    "ARE" "AUT"    45.116 33 2016 0 83657 "GBR"
    "ARE" "AUT"     8.838 37 2015 0 83657 "GBR"
    "ARE" "AUT"  5749.993 34 2016 0 83657 "GBR"
    "ARE" "AUT"  4645.972 38 2016 0 83657 "GBR"
    "ARE" "AUT"     4.341 39 2014 0 83657 "GBR"
    "ARE" "AUT"      5.25 33 2014 0 83657 "GBR"
    "ARE" "AUT"    37.912 32 2015 0 83657 "GBR"
    "ARE" "AUT"  1613.235 35 2015 0 83657 "GBR"
    "ARE" "AUT"   215.647 32 2016 0 83657 "GBR"
    "ARE" "AUT"    94.859 34 2017 0 83657 "GBR"
    "ARE" "AUT"   113.131 34 2014 0 83657 "GBR"
    "ARE" "AUT"  7878.134 38 2015 0 83657 "GBR"
    "ARE" "AUT"  25562.29 38 2014 0 83657 "GBR"
    "ARE" "AUT"   463.958 39 2017 0 83657 "GBR"
    "ARE" "AUT"   197.265 32 2017 0 83657 "GBR"
    "ARE" "AUT"   543.648 35 2016 0 83657 "GBR"
    "ARE" "AUT"  1419.707 35 2017 0 83657 "GBR"
    "ARE" "AUT"   208.752 39 2015 0 83657 "GBR"
    "ARE" "AUT"   148.647 31 2014 0 83657 "GBR"
    "ARE" "AUT"   428.537 37 2016 0 83657 "GBR"
    "ARE" "AUT"   268.783 39 2016 0 83657 "GBR"
    "ARE" "AUT"    92.246 37 2014 0 83657 "GBR"
    "ARE" "AUT"  5799.784 34 2015 0 83657 "GBR"
    "ARE" "AUT"   292.787 31 2017 0 83657 "GBR"
    "ARE" "AUT"   371.835 31 2016 0 83657 "GBR"
    "ARE" "AUT"    13.552 37 2017 0 83657 "GBR"
    "ARE" "AUT"   926.352 32 2014 0 83657 "GBR"
    "ARE" "AUT"    69.655 33 2015 0 83657 "GBR"
    end
    Thank you in advance. I am assuming many of you will not understand my question nor my dataex as I think I have inserted it wrongly.

  • #2
    Your -dataex- is perfect!

    Your data looks like a reasonable organized data set with unit of analysis equal to the pair of Reporter and Partner ISO3 codes and the Product Code. Whether it is suitable for the regressions and analyses you plan to do is impossible to say as you tell us nothing about what those regressions and analyses might be.

    Comment


    • #3
      Thank you so much for your response!
      I am going to attempt to use; panel data, sum stat, desc of var, share of trade UK with EU/ROW, Pre/Post Brexit export/import changes, Gravity Model with dummies, Correlation Analysis (I am not sure if that makes any sense again sorry)

      Comment


      • #4
        Those analyses sound like things for which this data looks suitable.

        Comment

        Working...
        X