Announcement

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

  • specifying different Fixed Effects (fe) with "xtpoisson"

    Dear all,

    I need some help to better understand the use of the fixed effects (fe) with xtpoisson.

    I am investigating the effect of non-tariff measures (NTMs) on international trade.

    I have built a panel database composed of trade volumes for seven years (2012-2018), 50 importers, 150 exporters, and 50 products.
    My panel database is constructed:
    egen id = group(exporter importer product)
    xtset id year

    To capture these effects I am using the within estimator following STATA command:

    xtpoisson import ntm, fe vce(robust)

    I want to test different variations of fixed effects, thus my question is: which of the following fixed effects does the “fe” option include:
    1. Exporter x importer x product
    2. Exporter x year
    3. Exporter
    4. Year
    5. Product x importer
    6. Product
    7. Importer
    8. Product x year
    9. Importer x year
    10. Exporter x product x year
    11. Exporter x importer x year
    I would really appreciate your help so as to better understand how to run the model with different fixed effect specification: For example using 1 and 4 in one model, than testing it with 2 and 5 in another model as per points above.


    Thank you very much for your help,
    G.M.

  • #2
    Dear George Mane

    xtpoisson includes a FE for the group defined by xtset, in your case that is exporter x importer x product. If you want to use other types of FE, I suggest you consider the commands ppmlhdfe and ppml_panel-sg. Note, however, that the kind of fixed effects to use should be defined based on what you want to model and not by running a number of specifications and picking the one that gives convenient results.

    Best wishes,

    Joao

    Comment


    • #3
      Dear Joao,

      Thank you very much for your clarification.

      Can I use the FE for year (point 4) with the following code:

      xtpoisson import ntm i.year, fe vce(robust)

      Thank you,

      G.M.
      Last edited by George Mane; 29 Apr 2019, 11:22.

      Comment


      • #4
        That will give you pair and time FE.

        Best wishes,

        Joao

        Comment


        • #5
          Dear Joao,

          I have two doubts:

          First:

          If I understand correctly, if my panel is:

          egen id = group(exporter importer product)
          xtset: id year


          Then:

          xtpoisson import ntm i.year, fe vce(robust)

          would give me pair (exporter x importer x product) and time (year) fixed effects?


          Second:

          Can I obtain with xtpoisson a combination of pair fixed effects (product x importer) and (exporter x year)? In case yes, how would I specify the code? I tried the following, but I am not sure it is correct.

          egen id = group(product importer)
          egen time = group(exporter year)
          xtset id time

          xtpoisson import ntm i.time, fe vce(robust)


          When I run this, STATA takes a lot of time to process (10 minutes on and it has just concluded the first iteration), surely due to the memory of my computer.


          Thank you very much for your help,

          Best regards,

          G.M.

          Comment


          • #6
            Dear George Mane,

            1 - You are correct.

            2 - You can use xtpoisson to do what you want, but it is not efficient. As I said above, I suggest you consider the commands ppmlhdfe and ppml_panel_sg.

            Best wishes,

            Joao

            Comment


            • #7
              Great, Thank you Joao,

              Your comments really help. I will try with the ppmlhdfe and ppml_panel_sg.

              Best wishes,

              G.M.

              Comment


              • #8
                Dear Joap and George
                I'm sorry to interrupt your discuss and show my terrible English.
                I've just started to learn the ppmlhdfe model recently and have some promble to that.
                Is ppmlhdfe compatible if there are not so many zero in the dependent var? Does it be better than reghdfe and ols?

                Comment


                • #9
                  Dear Qiyangfan Feng,

                  PPML based commands (there are several) are recommended whenever your model is multiplicative as is the case of the gravity equation of the Cobb-Douglas function. The proportion of zeros is not important.

                  Best wishes,

                  Joao

                  Comment

                  Working...
                  X