Announcement

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

  • #16
    Dear Mr Santos Silva,

    I contact you because I read that you use to work with trade data and I guess that you have the answer to my basic question.

    I have a database with export variation (between 2020 et 2019), by origin countries, destination countries, and products.

    Export variation (var20_19) is my dependant variable. I would like to include importer, exporter, and sector fixed effets in my equation.
    • First, could you tell me how to define (with xtset) my panel data in that case (I have no time dimention so I am a bit confused what are my different dimention in this panel)
    • Second, what would be the code to include these three fixed effect in my equation ?




    Thanks a lot for your help !

    Alexandre

    Comment


    • #17
      Dear Alexandre Dutour,

      I work with trade models, but not so much with trade data. anyway, I think you do not need to xtset your data and can just estimate the model using ppmlhdfe with the fixed effects you want. BTW, is your dependent variable really a variation? That is can it be negative? If so it may be better to use reghdfe.

      Best wishes,

      Joao

      Comment


      • #18
        Dear Joao Santo Silva,

        I have just realized that you answer my question the 10 June 2021. thank you very much. Let me clarifying my concern :


        I want to regress word export variation between two year (Var) on exporter, importer and industry dummies to capture the exporter, importer, and industy specific effect on world trade variation. I have encoded each of my three variables with encode(): exporter (141 countries), importer (233 countries),industry (5498 products), and I have extended the number of variable by default with STATA/SE with set maxvar. Then I ran the following regression concidering my dummies as categorical variables as follow :

        reg var i.exporter i.importer i.industry

        Unfortunatelly stata runs but is not able to complete the process (I mean I have to break the process manually with the red cross). However, when I run the following regression, it works :

        reg var i.exporter i.importer

        So I guess that I have too many variable in my regression.

        My first request is : do you have another way to estimate these effects ?

        Secondly, I am not interested in the effect of each dummy variable (exporter1 exporter2 importer1 importer2 industry1 industry2...) but in the three overall exporter effect, importer effect, industry effect. Is there a way to compute each exporter dummy effect in an overall expoter effect, each importer dummy effect in an overall importer effect, etc. ?



        Thank you for your answer !

        Best,

        Comment


        • #19
          Dear Alexandre Dutour,

          I suggest you look at commands such as reghdfe or xtreg with the fe option to "absorb" at least one of the sets of fixed effects.

          Best wishes,

          Joao

          Comment


          • #20
            Thank you for your answer !

            My main concern with reghdfe is that (absorb) doesn't allow to get fixed effect coefficients, that is my main goal in this regression.

            Regarding xtreg what would you put in xtset ? My concern is that I need two estimate all the three fixed effet. I have to set up one of the three dimention as the panel variable (xtset exporter for exemple), so xtreg won't allow me to estimate all the three fixed effect that I need.

            Any suggestion ?

            Alexandre

            Comment


            • #21
              I think there is an option on reghdfe to save the fixed effects you want.

              Comment


              • #22
                Dear @Joao
                I am investigating the impact of host country governance factors on Bangladesh’s OFDI. By using testpram , I choose time FE specification ( country FE not suggested by testtpram).

                I am wondering how to control of endogenity in this case.. few studies suggest employing country pair FE to control for endogenity, but in my case I only have ofdi data flowing from Bangladesh to transitional and developed economies ( have 2 country classification). Desperately seeking your advice.
                many thanks in advance

                Comment


                • #23
                  Correction - it’s testparm

                  Comment


                  • #24
                    @ Joao : I am using PPML MODEL. Because my data has lot of zeros , do you suggest I may also run Ivpoisson test to check if results are consistent .. but in that case how should I deal with zero values ? Shall I run Ivpoisson with same dataset that has zero or remove all zero ..
                    I am sure that FDI will have endogenity issue. If I use Ivpoisson to check for robustness and my results change in Ivpoisson due to endogenity then the whole purpose of using PPML fails ..
                    pl suggest
                    many thanks in advance
                    Last edited by Susan Jain; 06 Feb 2022, 07:44.

                    Comment


                    • #25
                      Dear Susan Jain,

                      I am not sure if I understand your question because ivpoisson can be used with zeros. The problem is that ivpoisson cannot be used with fixed effects, unless you have enough data to estimate the fixed effects. Also, keep in mind that the results of ivpoisson will depend on the quality of the instrument and it is difficult to find good instruments.

                      Best wishes,

                      Joao

                      Comment

                      Working...
                      X