Announcement

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

  • #16
    Thanks for your replay. Does it mean to set the proxy variable of the importer country separately in stata? Or is it possible to directly use the country's fixed effect in ppmlhdfe to get the fixed effect coefficient of the importer country?

    Code: xi: ppmlhdfe Y i.countrypair i.year X1 X2 X3

    Comment


    • #17
      Does it mean to set the proxy variable of the importing country separately in stata?
      Or is it possible to directly use the country's fixed effect in ppmlhdfe to get the fixed effect coefficient of the importing country?

      Code:xi: ppmlhdfe Y i.countrypair i.year X1 X2 X3

      Comment


      • #18
        Thanks for your replay. Does it mean to set the proxy variable of the importer country separately in stata? Or is it possible to directly use the country's fixed effect in ppmlhdfe to get the fixed effect coefficient of the importer country?

        Code: xi: ppmlhdfe Y i.countrypair i.year X1 X2 X3
        Many thanks!

        Comment


        • #19
          Sorry, I am a bit lost here. Can you please start a new thread and explain the problem from the start?

          Joao

          Comment


          • #20
            Dear Professor Santos
            It doesn't matter. I am a new stata in the statalist. My problem is that the model I have been doing research is the structural gravity model that uses the ppml method to regress. The explanatory variable is the country-pair trade flows in services in 2014-2017, and the explanatory variables are also the variables that indicate the national characteristics between the two countries. For example, the distance between the two countries, whether they are adjacent, and whether they have a common history. Now I want to get the exporter country, importer country and time fixed effect, and my main purpose is to get the fixed effect coefficient of the importer country in the stata operation result. The teacher's previous suggestion is to use the ppmlhdfe command to obtain the importer national fixed effect coefficient, I am not quite sure how to use the ppmlhdfe command to obtain an estimate of the fixed effect coefficient of the importer country separately from the country-pairs?
            The command I am going to use is xi: ppmlhdfe Y i.countrypair i.year X1 X2 X3, but I don't know if it’s right?
            Many thanks!

            Comment


            • #21
              Hi John,
              It looks like the ppmlhdfe equivalent of what you are trying to estimate is

              ppmlhdfe Y X1 X2 X3, abs(countrypair year)

              and it is possible to save the fixed effects by modifying the above to

              ppmlhdfe Y X1 X2 X3, abs(countrypair year, savefe)

              However, this still does not achieve your stated goal of obtaining exporter and importer fixed effects for each country. Note that the countrypair fixed effect you have included here would absorb any importer- or exporter-specific fixed effects.

              Hope this is helpful!

              Tom

              Comment


              • #22
                Dear Professor Santos
                It doesn't matter. I am a new stata in the statalist. My problem is that the model I have been doing research is the structural gravity model that uses the ppml method to regress. The explanatory variable is the country-pair trade flows in services in 2014-2017, and the explanatory variables are also the variables that indicate the national characteristics between the two countries. For example, the distance between the two countries, whether they are adjacent, and whether they have a common history. Now I want to get the exporter country, importer country and time fixed effect, and my main purpose is to get the fixed effect coefficient of the importer country in the stata operation result. The teacher's previous suggestion is to use the ppmlhdfe command to obtain the importer national fixed effect coefficient, I am not quite sure how to use the ppmlhdfe command to obtain an estimate of the fixed effect coefficient of the importer country separately from the country-pairs?
                The command I am going to use is xi: ppmlhdfe Y i.countrypair i.year X1 X2 X3, but I don't know if it’s right?
                Many thanks!


                Comment


                • #23
                  Dear John Alice,

                  Please use the ppmlhdfe with the option a(....., save); check the help file.

                  Best wishes,

                  Joao

                  Comment


                  • #24
                    Dear Mr Zylkin
                    1. This is very helpful! Thanks for your replay. You mean that both codes can only include the fixed effect of the importer and exporter countries, but the fixed effect coefficient of the importer country cannot be obtained. How can I obtain the fixed effect coefficient of the importer country?
                    2. Also, I have seen papers that consider the fixed effects of importer and exporter countries as constant. Does it mean that the regression results of constants are reported as fixed effects of importer and exporting countries in the stata results?
                    Many thanks

                    Comment


                    • #25
                      Dear Professor Santos
                      Thanks for your replay. Also, I have seen papers that consider the fixed effects of importer and exporter countries as constant. Does it mean that the regression results of constants are reported as fixed effects of importer and exporting countries in the stata results?

                      Comment


                      • #26
                        Hi John - for 1, do you understand what I mean when I say your countrypair fixed effect would absorb any importer- or exporter-specific fixed effects?

                        If you added importer fixed effects to your model, it would look like this

                        ppmlhdfe Y X1 X2 X3, abs(countrypair importer year, savefe)

                        However, it would not change anything, because you already have "countrypair", which varies by exporter and importer. The "importer" dimension is therefore already accounted for by countrypair.

                        So if you want to estimate importer fixed effects, you will need to replace "countrypair" with something else.

                        For 2, I'm afraid I don't understand what you mean here.

                        Regards,
                        Tom

                        Comment


                        • #27
                          Dear Mr Zylkin
                          I probably understand what you mean, but the data of my explanatory variables is the amount of state-to-bilateral trade in services. For example, Australia and China, Australia and the United States, Australia and Japan, and so on. Bilateral service trade flow data for 32 exporter countries and 32 importier countries respectively.
                          My other idea is whether the data of importer and exporter countries can be separated from the data. For example, the main entities of China as importer countries ,exporter countries: Australia, South Korea, Germany and Japan, which are marked as 1, 2, 3, and 4 respectively. the main entities of Australia as exporter countries,importer countries are Japan, New Zealand, South Korea, etc., labeled 1, 2, 3, 4, etc., and then replace the countrypair with data different from the exporter and importer countries. I don't know if the teacher understands what I mean.
                          The picture is the result of my operation with the two commands you said.
                          Click image for larger version

Name:	QQ图片20190709102611.png
Views:	1
Size:	65.0 KB
ID:	1506922
                          Click image for larger version

Name:	TJ$`D2N`G@$GN@W6]DX)(Y6.png
Views:	1
Size:	84.1 KB
ID:	1506923



                          Comment


                          • #28
                            Hi John,
                            There looks like there is a coding mistake with either lnpopj or lnpopi. lnpopi appears to always be 10 * lnpopj. This is likely why you are getting such strange results for these variables in the regression.

                            Maybe it would help if you explained a bit what you are intending to use the importer fixed effects for? I ask because there are several different ways you could capture importer-specific effects in this setting. The simplest way would be to have exporter, importer, and time fixed effects instead of having country-pair and time fixed effects. But there are other options that might be better, depending on what it is you are trying to do.

                            Regards,
                            Tom

                            Comment


                            • #29
                              Dear Mr Zylkin
                              Thanks for your replay!My main purpose is to estimate the size of service trade barriers in each importer country using the fixed effect of the importer country in the structural gravity model,not having country-pair fixed effects. The regression method is the importer country, exporter country and time fixed effect under the ppml regression method. However, my explanatory variable is the country-pair trade in services between countries. The explanatory variables are the population, GDP, service trade restriction levels of importer and exporter countries, and the distance variables indicating the characteristics of countries. So I don't know how to get the fixed effect coefficient of the importing country from the data?
                              Many thanks!

                              Comment


                              • #30
                                Tom Zylkin ,,, Joao Santos Silva can i use exporter, importer and time fixed effects separately like "ppmlhdfe dep_Var Ind_var,absorb(exp imp time)"
                                not pair fixed effects? my data is panel data of 61 countries for the time period 2000-2016 and i am estimating the impact of institutional quality on bilateral exports.
                                Last edited by Aqib Khursheed; 17 Jul 2019, 04:36.

                                Comment

                                Working...
                                X