Announcement

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

  • Dear alessio lombini,

    1. It is indeed consistent in those conditions, so there is no need to perform any specific tests, but it is always good to do the RESET test.
    2. That is up yo you; you need to decide how better to model your data.

    Best wishes,

    Joao

    Comment


    • Dear professor,

      thank you very much for your prompt response and your suggestions, they are both truly appreciated. Concerning the first answer, would you also know some article/reference that deals with this? I unsuccessfully searched that in the literature, and since this is for my Master's thesis, it would be really useful to make references.
      Thank you again for your help

      Alessio
      Last edited by alessio lombini; 28 Jun 2021, 09:34.

      Comment


      • Dear alessio lombini,

        See, for example, here.

        Best wishes,

        Joao

        Comment


        • Dear All,

          I am currently working on the international trade flows using the structural gravity model with a panel data. In addition to the FTA indicator, I have created NAFTA variable to check the impact of this specific trade agreement. However, once I include pair fixed effects, NAFTA is dropped from my regression.

          NAFTA variable created as Thomas Zylkin did in his do files:

          generate NAFTA = 0
          replace NAFTA = 1 if (exporter == "CAN" & importer == "USA" & year >= 1994) | (exporter == "CAN" & importer == "MEX" & year >= 1994) | (exporter == "MEX" & importer == "USA" & year >= 1994) | (exporter == "MEX" & importer == "CAN" & year >= 1994) | (exporter == "USA" & importer == "MEX" & year >= 1994) | (exporter == "USA" & importer == "CAN" & year >= 1994)
          replace RTA = 0 if NAFTA == 1

          And the regression that I run is as follow:

          ppmlhdfe tradeflow_baci RTA NAFTA, a(imp_time exp_time first#second) cluster(pair_id)

          Here is the problem I receive after running the above code:

          note: NAFTA omitted because of collinearity over lhs>0 (creates possible existence issue)

          I receive the same thing with PPML_panel_sg

          If any of you can help me to figure out this issue, I would appreciate it. And I would like to thank to Zylkin as his codes are helping me a lot. Will definitely be cited.

          Best
          Cevik

          Comment


          • Dear Yusuf Ceylan,

            That is probably because your data does not cover years before 1994 and therefore the NAFTA indicator is collinear with the pair fixed effects in your sample.

            Best wishes,

            Joao

            Comment


            • Dear @Joao Santos Silva

              Thank you very much for your prompt reply. As the note is saying "collinearity over lhs", I thought NAFTA was collinear with the explained variable.

              You are correct. My data covers the years 1994-2019. I will try to do the same thing for some of the other agreements and see if there is collinearity as well.

              However, NAFTA is one of the special FTAs I am interested in. If you think there is any way to deal with this collinearity issue, I can go that way as well. I should note that there is no way for me to use data before 1994 due to data limitations.

              Best regards
              Cevik

              Comment


              • Dear Yusuf Ceylan,

                I am afraid that without earlier data you cannot estimate the effect of NAFTA.

                Best wishes,

                Joao

                Comment


                • Dear @Joao Santos Silva

                  Thank you very much for your help. Much appreciated.

                  Best regards
                  Ceylan

                  Comment


                  • Tom Zylkin Joao Santos Silva

                    Dear Tom Zylkin ,

                    I was reading your paper, Do cross-border patents promote trade, Canadian journal of economics 2022 55(1) pp. 379–418. I want to ask some clarificatory questions.
                    I have panel data on bilateral import flows of 87 developing countries from 28 advanced countries between 1976-2019 across 24 ISIC industries. Therefore my dependent variable is imports of country i (importer) from country e (exporter) in industry (s) at year (t). I am starting to fit Anderson-van Wincoop (2003) gravity model. In my specification, i have vector Z it (vector of time-varying importer country-specific variables like human capital index, openness index, GDP, Population etc); Ket ( vector of time-varying exporter country-specific variables); vector Jei(vector of time constant link specific dyadic variables like distance, contiguity, common colony etc.). I tried estimating this model using ppmlhdfe, (Correia, Guimaraes, Zylkin, 2020). In order to approximate endogenously determined non-linear multilateral resistance factors, I tried using the approach as you used in the paper, Do cross-border patents promote trade. I generate the appropriate set of fixed effects as :

                    - generating exporter–industry–time FE's
                    Code:
                    egen ekt = group(iso_e Industry Year) 
                    - generating importer–industry–time FE's
                    Code:
                    egen ikt = group(iso_i Industry Year)
                    - generating exporter–importer–industry or “pair–industry” FE's
                    Code:
                    egen eik = group(iso_e iso_i Industry)
                    I then fit the ppml as follows:

                    Code:
                    ppmlhdfe Trade_Value Z_it  K_et  J_ei, absorb(ekt ikt eik) cluster(distance)
                    However, this drops my variable of interest in vector Z it and all other importer country-specific time-varying variables, like human capital index, GDP etc. It also drops time-varying exporter-country specific variables in vector Ket and also drops time-constant vector of dyadic variables Jei . Before reading your paper, I also tried importer-time and exporter-time fixed effects to approximate for time-varying non-linear exporter and importer multilateral resistance, this approach also dropped my treatment variable that varies across importer-time dimensions due to collinearity and was subsumed in importer-time fixed effects. Therefore, I thought instead of using two-way, I rather should use a three-way gravity model (exporter-industry-time; importer-industry-time and pair-industry fixed effects) like in your case, but I again had the same problem, this approach dropped the entire list of covariates.

                    Please suggest to me how to modify the gravity model in this case, use the right set of fixed effects to account for endogenously determined non-linear multilateral resistance factors (Pi and Pj) and still retain the effects of the time-varying importer or exporter country-specific variables. Please get back to me, I shall be very thankful to you.

                    I am mentioning Joao Santos Silva here to add further recommendations. I shall be very thankful to both of you and guide me on how to go about this problem.

                    regards,
                    (Ridwan)

                    Comment


                    • Originally posted by Ridwan Sheikh View Post
                      Tom Zylkin Joao Santos Silva

                      Dear Tom Zylkin ,

                      I was reading your paper, Do cross-border patents promote trade, Canadian journal of economics 2022 55(1) pp. 379–418. I want to ask some clarificatory questions.
                      I have panel data on bilateral import flows of 87 developing countries from 28 advanced countries between 1976-2019 across 24 ISIC industries. Therefore my dependent variable is imports of country i (importer) from country e (exporter) in industry (s) at year (t). I am starting to fit Anderson-van Wincoop (2003) gravity model. In my specification, i have vector Z it (vector of time-varying importer country-specific variables like human capital index, openness index, GDP, Population etc); Ket ( vector of time-varying exporter country-specific variables); vector Jei(vector of time constant link specific dyadic variables like distance, contiguity, common colony etc.). I tried estimating this model using ppmlhdfe, (Correia, Guimaraes, Zylkin, 2020). In order to approximate endogenously determined non-linear multilateral resistance factors, I tried using the approach as you used in the paper, Do cross-border patents promote trade. I generate the appropriate set of fixed effects as :

                      - generating exporter–industry–time FE's
                      Code:
                      egen ekt = group(iso_e Industry Year) 
                      - generating importer–industry–time FE's
                      Code:
                      egen ikt = group(iso_i Industry Year)
                      - generating exporter–importer–industry or “pair–industry” FE's
                      Code:
                      egen eik = group(iso_e iso_i Industry)
                      I then fit the ppml as follows:

                      Code:
                      ppmlhdfe Trade_Value Z_it K_et J_ei, absorb(ekt ikt eik) cluster(distance)
                      However, this drops my variable of interest in vector Z it and all other importer country-specific time-varying variables, like human capital index, GDP etc. It also drops time-varying exporter-country specific variables in vector Ket and also drops time-constant vector of dyadic variables Jei . Before reading your paper, I also tried importer-time and exporter-time fixed effects to approximate for time-varying non-linear exporter and importer multilateral resistance, this approach also dropped my treatment variable that varies across importer-time dimensions due to collinearity and was subsumed in importer-time fixed effects. Therefore, I thought instead of using two-way, I rather should use a three-way gravity model (exporter-industry-time; importer-industry-time and pair-industry fixed effects) like in your case, but I again had the same problem, this approach dropped the entire list of covariates.

                      Please suggest to me how to modify the gravity model in this case, use the right set of fixed effects to account for endogenously determined non-linear multilateral resistance factors (Pi and Pj) and still retain the effects of the time-varying importer or exporter country-specific variables. Please get back to me, I shall be very thankful to you.

                      I am mentioning Joao Santos Silva here to add further recommendations. I shall be very thankful to both of you and guide me on how to go about this problem.

                      regards,
                      (Ridwan)
                      Hi Ridwan,

                      If I understand correctly, you have Z_it covariates that vary only by i and t and you have fixed effects that vary by i,k, and t. If so, your fixed effects would absorb your Z_it variables, so what you are seeing is correct. In order to be identified, your variables would also to vary with something other than i, k, or t. Since they only vary by i and t, they do not.

                      Since the variables you want to identify coefficients for only vary by i and t, you cannot include either it or ikt FEs. You also cannot include eit FEs. I would stick with everyone you are currently doing but don't include the ikt FEs.

                      Hope this helps!

                      Regards,
                      Tom

                      Comment


                      • Thank you Tom Zylkin this was very helpful. The ekt and eik FE's worked.
                        However, I was wondering by not including ikt FE's, we do not have effective control for Inward (importer) multilateral resistance. Instead, if I have dyadic time-varying dummy (say Free trade agreements) FTAij,t that takes value 1 if two countries (i and j) are signatories to FTA at time t and 0 otherwise and I interact my variable of interest that varies across Importer-time dimensions (mi,t) with FTAij,t dummy i.e., mi,t x FTAij,t , then my understanding is we can use ikt FE's and still retain mi,t . I understand the interpretation of the coefficient will change, it would be the effect of mi,t on the outcome (import flows of i) in countries that are signatories of FTA relative to others. We can additionally use pair-fixed effects (ij FE's) to account for endogeneity in FTAij,t, Baier and Bergstrand (2007). Does this make sense? and Please get back to me, on whether one can proceed with it. ?

                        Comment


                        • Hi Ridwan,
                          If I understand your proposal correctly, the interaction between m_it and FTA_ijt would indeed be identified, but it still will not be possible to get a separate estimate for m_it if you have an ikt fixed effect.
                          Regards,
                          Tom

                          Comment


                          • Thanks, Tom Zylkin that is correct, we cannot have a separate impact of m_it with ikt FE's.
                            Instead, if I do as follows:
                            Code:
                             
                             Trade_Value = lambda_it + lambda_jt + lambda_ij + beta_1(FTA_ij,t) +  beta_2(m_it*FTA_ijt) + e_ij,t
                            Code:
                            When FTA_ij,t =1, we have
                            Code:
                             beta_1 + beta_2 * m_it + lambda_it + lambda_jt + lambda_ij + e_ij,t
                            Code:
                            ​​​​​​​When FTA_ij,t =0, we have
                            Code:
                             lambda_it + lambda_jt + lambda_ij + e_ij,t
                            The marginal effect (difference) is obtained as
                            Code:
                            beta_1 + beta_2 * m_it
                            which gives how trade value (outcome) varies at different levels of m_it between countries that are signatories of FTA relative to those that are not.
                            I hope I am making some sense here. The attractive feature of this model is we can use importer-time and exporter-time FE’s to control for MRTs and yet obtain some marginal treatment effects of our variable of interest (m_it). Additionally, we include exporter-importer FEs, i.e., pair-fixed effects to address the endogeneity of trade-agreement dummy. All the estimations will be done using Poisson-pseudo maximum likelihood estimator with high-dimensional fixed effects (ppmlhdfe).
                            Please get back to me whether this approach is feasible or makes some sense? or any suggestions that you may recommend.
                            I agree, I may be deviating from what I was exactly intended to measure (the separate effect of m_it), but with this approach, I at least have some marginal treatment effects of m_it in relation to FTA dummy.

                            Thanks and regards,
                            (Ridwan)

                            Comment


                            • Hello Stata Users,

                              I am trying to analyse the effect of Brexit on Irish exports using 4-year interval panel data for 87 countries from 2000-2020, and using the fixed effects PPML model outlined by Yotov et al. (2016), including variables such as log distance and dummies such as contiguity, colonial ties, and common language. I also include importer- and exporter-time fixed effects to account for multilateral resistances, and cluster by country pairs. I am also currently not including domestic trade in my model. So far, my general gravity equation is:

                              Code:
                              ppmlhdfe tradeflow_comtrade_d IMPORTER_TIME_FE* EXPORTER_TIME_FE* distw contig comlang_off col_dep_ever if exporter != importer, cluster(pair_id)
                              So far I have modelled the gravity equation in this way to generate parameter estimates, and to see whether my estimates agree with traditional gravity estimates which do include domestic trade. The results thus far look pretty similar to the traditional gravity estimates in Yotov et al. (2016). I will later include RTA, EU and Brexit dummies to this model.

                              My main questions are:

                              1) should I only run a PPML model on Irish exports? As in, is my dependent variable just Irish exports to the other 86 countries, or;
                              2) can I model each countries' bilateral trade, and then include Irish-trade and Brexit dummies?

                              I was also wondering whether I need to run forecasts as 2020 is the only "Brexit year" in my model for the UK, or whether I can assign a potential Brexit dummy to be equal to one instead of zero for 2016 onwards (when Brexit was voted for). Apologies for the long message, I am just struggling a bit to model this idea.

                              I would greatly appreciate any help you can offer!

                              Many thanks,

                              Ronan

                              Comment


                              • Hi joao
                                The topic of my research is"Determinants of electronic waste imports:Comparative analysis of developed and Developing countries"
                                My panel data contains 13 developed and 13 Developing countries data for the period 2006-2021.Dependent variable is imports of e-waste and independent variables are GDPij,CPIij,EPIij,distance and population.Dependent variable have missing values.
                                Can you suggest me which methodology i should use?
                                Can i use ppml?
                                And should i estimate combined model for developed and Developing countries or estimate it seperately?

                                Comment

                                Working...
                                X