Announcement

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

  • Domestic trade flows in structural Gravity estimation

    Dear Tom Zylkin and Joao Santos Silva,

    I am looking at the impact of preferential trade agreements (PTAs) on export flows in the sample of 87 countries over 1990-2017 period. The data on export flows is at disaggregated industry level based on SITC rev. 3 classification extracted from UNCOMTRADE, whereas the data on PTAs is based on Deep Trade Agrrements database from World Bank.

    At first, i am looking at the impact of PTAs on export flows at aggregate level, therefore i aggregate across all sectors. In which case, each observation is total export flows (across all sectors) of country i to country j in year t. Therefore i estimate the following model using the PPML estimator with asymptotic bias correction in Weidner and Zylkin (2021):

    Xijt = exp(rit + pjt + PTAijt + DTAijt + DEPTHijt + INVijt + epsilonijt). (1)

    where,
    Xijt is total export flows of country i to country j in year t.
    rit and pjt are exporter-time and importer-time fixed effects used to control for multilateral trade resistance.
    PTAijt is a dummy varaiable indicating the presence (or not) of preferential trade aggrements between country i and country j in year t.
    DTAijt is a dummy that indicates whether the corresponding agreement is deep or shallow.
    DEPTHijt is a count measure of number of provisions included in corresponding PTA.
    INVijt is a dummy that indicates whether the corresponding DTA includes an investment provision.

    In the final specification, i am interested to incorporate both international and intra-national trade flows, where Xijt denotes bilateral gross export flows from country i to country j in year t, including the case i = j, which identifies domestic (or intra-national) trade flows. The domestic trade flows are calculated using the GDP-based measure, that is:

    Xiit = RGDPNAit - Σ j# i Xijt

    where, domestic trade is the difference between GDP of exporter and sum of all its exports to the world (Σ j# i Xijt). For GDP, i use the measure of real gross domestic product based on national accounts (RGDPNA), which is retracted from Penn World Tables (PWT 10.0).

    MY QUESTION IS:

    For the observations in dependent variable for which i = j (that denotes domestic or intra-national trade flows Xiit), what should be the corresponding values of PTAijt, DTAijt, DEPTHijt, INVijt in equation (1) ?. I am little confuesed that any trade agreement (or its provisons) is between two country pairs i and j, but for the observation in dependent variable where i = j, what corsponding values should we assign to PTAijt, DTAijt, DEPTHijt, INVijt is little ambigious to me.

    I shall be very thankful if you provide any guidance or if there is any specific recommendation, i should be careful of.

    Your help will be greatly appreciated.

    I am sorry, if this does not seem a STATALIST query.

    Thanks and regards,

    (Ridwan)
    Last edited by Ridwan Sheikh; 14 Apr 2024, 01:52.

  • #2
    Dear Ridwan Sheikh,

    Those variables are typically set to 0 when i=j. Not that you should include a dummy for i=j and possibly interact it with time.

    Best wishes,

    Joao

    Comment


    • #3
      Thank you Joao Santos Silva, this was really helpful.

      Based on the suggestion you gave above (in #2) , I have one final question to ask. For better clarity, I am posting the data example below:

      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input str3(iso_i iso_j) int Year double(GDP_it Exports_ijt) byte(PTA_ijt DTA_ijt Home_ij) int HY
      "USA" "FRA" 1990 10.5  1.7 1 0 0    0
      "USA" "DEU" 1990 10.5  3.2 0 0 0    0
      "USA" "GBR" 1990 10.5  2.5 1 1 0    0
      "USA" "USA" 1990 10.5  3.1 0 0 1 1990
      "DEU" "PRT" 1990 20.3  9.4 1 1 0    0
      "DEU" "USA" 1990 20.3  6.7 1 0 0    0
      "DEU" "LTU" 1990 20.3  5.9 0 0 0    0
      "DEU" "DEU" 1990 20.3 -1.7 0 0 1 1990
      "USA" "FRA" 1991 13.7  8.6 1 1 0    0
      "USA" "TUN" 1991 13.7  3.2 0 0 0    0
      "USA" "GBR" 1991 13.7  9.5 1 1 0    0
      "USA" "USA" 1991 13.7  7.6 0 0 1 1991
      "DEU" "GBR" 1991 22.4  7.3 1 0 0    0
      "DEU" "USA" 1991 22.4  8.4 1 0 0    0
      "DEU" "LTU" 1991 22.4  3.5 0 0 0    0
      "DEU" "DEU" 1991 22.4  3.2 0 0 1 1991
      end
      In this example, USA in 1990 is exporting to FRA, DEU, and GBR. I aggregate the export flows of USA across all partners to obtain the total exports of USA to the rest of world in year 1990 (i.e., Σ j# i Xijt = 1.7 + 3.2 + 2.5 = 7.4). The GDPUSA,1990 = 10.5 , therefore dometic trade flows are obtained as:

      ExportsUSA-USA,1990 = GDPUSA,1990 - Σ j# i Xijt = 10.5 - 7.4 = 3.1

      Q.1 :

      Please let me know, if I am making any mistakes. I am not sure whether this is the correct data representation, I mean, is this how observations with i=j enter in particular rows ?

      Q.2:

      By following the similar approach of imputing the dometic trade flows for DEU, we have

      GDPDEU,1990 = 20.3 and Σ j# i Xijt = 9.4 + 6.7 + 5.9 = 22

      Therefore domestic trade flows for DEU in year 1990 are obtained as:

      ExportsDEU-DEU,1990 = GDPDEU,1990 - Σ j# i Xijt = 20.3 - 22 = -1.7

      which is a negative number. I am not sure what should be the treatment of negative dometic trade flows using a PPML estimator. Should we drop them or be replaced with positive values using some sort of interpolation. ?

      Q. 3:

      As you suggested in #2, i have created two additional variables, a dummy for i=j and its interaction with year, generated as

      Code:
      gen Home_ij=1 if iso_i==iso_j
      replace Home_ij=0 if Home_ij==.
      
      gen HY = Home_ij* Year
      
      egen pair  = group( iso_i iso_j)
      xtset pair Year
      If we include a dummy for i=j (Home_ij) and its interaction with year (HY) additively in the estimation. What is the interpretation for the coefficient of Home_ij and HY

      I am sorry for posting a simplistic questions and taking your precious time, It would be really helpful if you confirm whether i am doing it right. The number of observations will increase significantly with dometic trade flows entering as additional observations and i am not fully clear on how do they enter in particular rows, and what should be their treatment using a PPML estimator, if any of such flows are negative.



      Thanks and regards,
      (Ridwan)

      Comment


      • #4
        Dear Ridwan Sheikh,

        1. Looks good to me, but check

        Campos, R., J. Timini, and E. Vidal(2021): “Structural Gravity and Trade Agreements: Does the Measurement of Domestic Trade Matter?Economics Letters, 110080.

        2. For small countries, subtracting each country's aggregate exports from its GDP can produce negative values, due to the value-added nature of GDP. In those cases, the standard is to replace the negative number with a zero.

        3. Sorry, I meant, interact home with year dummies. You can "absorb" these variables because their coefficients are not generally of interest. The variables are included in the model to account for the difference between intra and international trade, and allow these differences to vary by year.

        Best wishes,

        Joao

        Comment


        • #5
          Thank you Joao Santos Silva for taking your time to answer my queries. This was really helpful and I appreciate it a lot.

          Thanks and regards,
          (Ridwan)

          Comment


          • #6
            Dear Joao Santos Silva I have one final clarification.
            In the example above, suppose trade flows are at sectoral level. If we index sector by s, then, the doemstic trade flows in sectors s are alternatively defined as:


            Xiits = RGDPNAit - Σ j# i Xijts

            Σ j# i Xijts - are total exports of country i in sector s to the rest of world.
            Since we do not have a data on sector-specific GDP, I am using total GDP in PWT database.


            Is this correct ?

            Thanks and Regards,
            (Ridwan)

            Comment


            • #7
              Dear Ridwan Sheikh,

              I am afraid I cannot help you with this as I no experience with intra-national trade at the sector level.

              Best wishes,

              Joao

              Comment


              • #8
                Thanks Joao Santos Silva . Your kind help is much appreciated.

                Thanks and regards,
                (Ridwan)

                Comment


                • #9
                  Dear Joao Santos Silva, I have one more thing to ask

                  1) I created a dummy for domestic trade flows i=j, i.e., Home_ij=1 for domestic trade flows, and 0 for international trade flows. As you said in #2, I interact Home_ij with year dummies as:


                  Code:
                  tabulate Year, generate(yr)
                  
                  local n = _N
                  
                  forvalues i = 1/`n' {
                  generate Home_ijYR`i' = Home_ij * yr`i'
                        }
                  I want to ask, how to absorb Home_ijYR1; Home_ijYR2 etc. all in once in ppmlhdfe using the absorb() option

                  2) I am using CEPII data to obtain information on each countrys' (iso_i and iso_j) membership to WTO.

                  I am creating a variable wto, such that wto =1 if both i and j are members of wto, and =0 otherwise
                  iso_i iso_j year wto_i wto_j wto
                  FRA USA 1990 0 0 0
                  FRA USA 1991 1 0 0
                  FRA USA 1992 1 1 1
                  FRA USA 1993 1 1 1
                  FRA FRA 1990 0 0 0
                  FRA FRA 1991 1 1 1 ?
                  FRA FRA 1992 1 1 1 ?
                  FRA FRA 1993 1 1 1 ?

                  However, you said in #2 is that when i=j, the indicators for trade agreements (PTA, INV, etc.) should be set as zero. What value should be set to the variable indicating joint membership to WTO, when i=j ? For example; in the table above, suppose FRA joined WTO in 1991, should i set wto=1 when i=j (in this case FRA), as done in the table?


                  Thanks and regards,
                  (Ridwan)

                  Comment


                  • #10
                    Dear Ridwan Sheikh,

                    1) You do not need to create all those variables, you can just absorb Home_ij#Year.

                    2) I would probably set it to zero like for FTA.

                    Best wishes,

                    Joao

                    Comment


                    • #11
                      Thank you very much Joao Santos Silva, it was very helpful.

                      Thanks and regards.
                      (Ridwan)

                      Comment

                      Working...
                      X