Announcement

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

  • estimating gravity model of trade

    Hello folks,

    Unlike my previous posts where I had questions regarding executing something in Stata, this one is about an econometric method that I don't have any experience with. Specifically, the gravity model of trade (or migration, or any bilateral movement) is

    HTML Code:
    https://wikimedia.org/api/rest_v1/media/math/render/svg/f5f19608ab4e476adc2b153fc210dca466f46f76
    ,
    where G is a constant, F is trade flow, D is distance and Mi and Mj are country sizes. My understanding is that I can estimate

    HTML Code:
    https://wikimedia.org/api/rest_v1/media/math/render/svg/abd852c0d2c6f3f761cffc634b953903db7147f4
    using OLS, but Santos Silva and Tenreyro (2006) recommend estimating

    HTML Code:
    https://wikimedia.org/api/rest_v1/media/math/render/svg/ec159b4e723e13bde4214f307bea67ec150b7964
    using PPML instead. For the second option, what would depvar and indepvars be in
    Code:
    ppml depvar indepvars [if] [in] [weight] [, options]
    ?
    Follow up question: can I throw in other independent variables, or is it better to collect residuals from PPML and continue my analysis using some other regression?

    Thank you very much,
    Stan
    Last edited by Stan Peterburgsky; 02 Jan 2025, 23:28.

  • #2
    Dear Stan Peterburgsky,

    The dependent variable is the flow you want to model, and the regressors are dummies or the log of strictly positive variables like distance. You can include any regressors you want, so there is no need to use the kind of two-step approach you mention. Anyway, I suggest you read some papers using the method to familiarize yourself with it.

    Best wishes,

    Joao

    Comment


    • #3
      Thank you very much! Honored to get an answer directly from the author!
      Another follow-up question, if I may: I am primarily interested in net flow, with positive and negative values and net explanatory variables such as diff in GDP growth, diff in crime rate, etc. Are there any techniques that deal with net values? Or is my best bet going with the Santos Silva and Tenreyro (2006) methodology (or something similar)? If I do proceed with the Santos Silva and Tenreyro (2006) methodology, is there a problem with double-counting G*Mi*Mj/D and G*Mj*Mi/D?

      Comment


      • #4
        Dear Stan Peterburgsky,

        A gravity equation is not the obvious choice to deal with net flows. Sometimes, gravity equations are used to model the total flow between two partners, but in trade there are good reasons to model only exports; net flows can then be obtained from these.

        Best wishes,

        Joao

        Comment


        • #5
          I am working on estimate the fdi bilateral flow using ppmlhdfe. Here is my code
          qui ppmlhdfe fdi_pos_ijt_new lndist comlang_off comcol fta_wto v2x_corr_jt edgi_jt, a(imp#year exp#year) cluster (imp#exp) d
          predict lambda_2way
          matrix beta_2way = e(b)
          ppml_fe_bias fdi_pos_ijt_new lndist comlang_off comcol fta_wto v2x_corr_jt edgi_jt, i(exp) j(imp) t(year) lambda(lambda_2way) twoway beta(beta_2way)

          However, stata responses:
          The set of x variables (lndist comlang_off comcol fta_wto v2x_corr_jt edgi_jt) does not appear to be of full rank after conditioning on the fixed effects.
          r(111);

          May I know what is the problem in my commands and how to fix this
          Thank you


          Comment


          • #6
            Dear Duy Dang,

            The problem is exactly that: those variables have perfect collinearity with the fixed effects. I do not know what your variables are, but the fact that some of your variables have names that end in jt suggests these are indeed perfectly collinear with the fixed effects you are using. These variables are automattically dropped by ppmlhdfe, but apparently not by ppml_fe_bias. You should exclude from the model all variables dropped by ppmlhdfe and run both commands again.

            Best wishes,

            Joao

            Comment

            Working...
            X