Announcement

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

  • Stata Commands for gravity model

    Hello. I am carrying out a research project for my masters titled 'Impacts of Economic and Political Shocks on EU-Russian Oil Trade' using yearly data from 2000-2022. Variales i am using are oil imports from Russia, oil exports to Russia, gdppc, distance population exchange rates oil prices and dummies such as past colonial relations and COMMON BORDER. I have imported the data to stata, proceeded to xtreg all variales cause It is panel data, except ones like GDP, exchange rates and population as for some reason, those 3 varales came out as stringed so I destiringed them. After I inputted xtreg , i keep getting no observations error and I Dont know what to do. Is it the way I layed my excel sheet out? I do not know. Any help would Be appreciated.

  • #2
    Welcome to the Stata Forum! Please, read the Stata Forum FAQ before posting (especially section 12).

    Comment


    • #3
      Apologies let me specify. I have yearly data from 2000-2022. Dependant variale is oil trade and independent variales are: distance, GDPPC(eu, GDPPC(ru), BRENT CRUDE OIL PRICE, exchange rates, population, population ru, and 5 dummies that take the value of 1: pipeline, past colonial relations, common BORDER, oil price shocks (eu), oil price shocks (Ru). After importing to stata i xtset all variales except three that I had to destring. After I ran:
      . xtreg PARTNER YEAR OILEXPORTSTORU OILIMPORTSFROMRU DISTANCE GDPPERC GDPPCRU BRENTCRUDEOILPRICE EXCHANGERATE POP POPULATIONRU PIPELINE PASTCOLONIALRELATIONS COMMONBORDER OILPRICESHOCK, I got this;
      no observations
      r(2000);

      I am not sure how to overcome this issue.

      Comment


      • #4
        Apologies let me specify. I have yearly data from 2000-2022. Dependant variale is oil trade and independent variales are: distance, GDPPC(eu, GDPPC(ru), BRENT CRUDE OIL PRICE, exchange rates, population, population ru, and 5 dummies that take the value of 1: pipeline, past colonial relations, common BORDER, oil price shocks (eu), oil price shocks (Ru). After importing to stata i xtset all variales except three that I had to destring. After I ran:
        . xtreg PARTNER YEAR OILEXPORTSTORU OILIMPORTSFROMRU DISTANCE GDPPERC GDPPCRU BRENTCRUDEOILPRICE EXCHANGERATE POP POPULATIONRU PIPELINE PASTCOLONIALRELATIONS COMMONBORDER OILPRICESHOCK, I got this;
        no observations
        r(2000);

        I am not sure how to overcome this issue.
        I am using Stata 17.0.

        Comment


        • #5
          You can find a first helpful answer here: Stata Forum FAQ (especially relevant in your case are sections #0, #3, and #12).

          Comment

          Working...
          X