Announcement

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

  • PPML reset test

    Hello to all of you.

    I have been working in a gravity model with 133 countries from 2005 to 2018 (Observations: 246.727).

    The RESET result test in 2 of 3 specifications are 0.000. Only one of the results is 0.36.

    My question is: ¿These results (Reset=0.00) may be acceptable taking into account the amount of observations and years? or ¿even with this big panel these specifications (reset=0.000) should be improved due the reset results?

    Hope you can help me.

    Kind regards.

    Carlos.

  • #2
    Dear CARLOS ABREO,

    How are you computing the test? Are you using the right standard errors?

    Anyway, assuming you are doing everything correctly, it is never good to fail the reset, but sometimes it is just not possible to improve the model in a reasonable way and we have to leave with it.

    Best wishes,

    Joao

    Comment


    • #3
      Professor Joao.

      I am glad to receive your advice.

      The command that I am using in Stata is the following:

      ppmlhdfe x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony sibling fta_wto log_exchange_rate_o log_exchange_rate_d, absorb(imp_TIFE exp_TIFE) cluster(cross_id)

      And the result is:

      Click image for larger version

Name:	Sin título.png
Views:	2
Size:	45.2 KB
ID:	1528860



      Although you said sometimes we have to leave with it, I would like to know if this result suggest there are any econometric problem such as multicollinearity, heteroscedasticity, etc? I ask it due the high R2 I got.

      Thank you.

      Comment


      • #4
        Dear CARLOS ABREO,

        Yo do not really show us how you performed the test. Anyway, it is standard yo let the importer and exporter FE vary over time; maybe that will help.

        Best wishes,

        Joao

        Comment


        • #5
          Dear Joao.

          To perform the test I followed the steps you post in this link: http://personal.lse.ac.uk/tenreyro/reset.do

          Additionally, I run the model with time varying FE and the result is the same (0.000). Then I run the model with FE (country pair FE) and the the model passed the reset test with 0.36.

          Do you think I can still work with these model even 2 of 3 models do not pass the reset test? If your answer is YES ¿which reasoning should I explain for this?

          Kind regards.

          Carlos

          Comment


          • #6
            The example we have in our website is fr a different case; please show us what you did.

            Best wishes,

            Joao

            Comment


            • #7
              Dear Joao.

              Thanks for your answer. What I did was it:

              1. I run the following command and I got it:

              ppmlhdfe x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony sibling comlang_ethno fta_wto log_exchange_rate_o log_exchange_rate_d, absorb(imp_TIFE exp_TIFE)

              Click image for larger version

Name:	Sin título.png
Views:	2
Size:	45.2 KB
ID:	1528970


              2. Then I got fitted values with this command:

              predict fit, xb

              3. Then I squared the adjusted values with this command:

              gen fit2=fit^2

              4. Then I run the model with the additional regressor I got previously:

              ppmlhdfe x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony sibling comlang_ethno fta_wto log_exchange_rate_o log_exchange_rate_d fit2, absorb(imp_TIFE exp_TIFE)

              Click image for larger version

Name:	Sin título2.png
Views:	1
Size:	44.1 KB
ID:	1528971


              5. Finally, I run the following command and I got:

              test fit2=0

              Click image for larger version

Name:	Sin título3.png
Views:	1
Size:	2.0 KB
ID:	1528972


              Kind regards.

              Carlos.

              Comment


              • #8
                It looks as if you are not clustering standard errors in the second regression.

                Joao

                Comment


                • #9
                  Dear Joao.

                  Sorry. It was my mistake. What I wanted to say was it:

                  FIRST MODEL: Specification with TIME INVARIANT FIXED EFFECTS FOR IMPORTERS AND EXPORTERS

                  1. I run the following command and I got it

                  ppmlhdfe x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony sibling fta_wto log_exchange_rate_o log_exchange_rate_d, absorb(imp_TIFE exp_TIFE) cluster(cross_id)

                  Click image for larger version

Name:	Sin título.png
Views:	1
Size:	45.0 KB
ID:	1529014


                  2. Then I got fitted values with this command:

                  predict fit, xb

                  3. Then I squared the adjusted values with this command:

                  gen fit2=fit^2

                  4. Then I run the model with the additional regressor I got previously:

                  ppmlhdfe x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony sibling fta_wto log_exchange_rate_o log_exchange_rate_d fit2, absorb(imp_TIFE exp_TIFE) cluster(cross_id)

                  Click image for larger version

Name:	Sin título2.png
Views:	1
Size:	46.7 KB
ID:	1529015



                  5. Finally, I run the following command and I got:

                  test fit2=0

                  Click image for larger version

Name:	Sin título3.png
Views:	1
Size:	2.2 KB
ID:	1529016


                  For this specification we can see that Reset test has passed.


                  SECOND MODEL: Specification with TIME VARIANT FIXED EFFECTS FOR IMPORTERS AND EXPORTERS

                  1. I run the following command and I got it

                  Click image for larger version

Name:	Sin título4.png
Views:	1
Size:	33.2 KB
ID:	1529017


                  2. Then I got fitted values with this command:

                  predict fit, xb

                  3. Then I squared the adjusted values with this command:

                  gen fit2=fit^2

                  4. Then I run the model with the additional regressor I got previously:

                  ppmlhdfe x log_distw contig colony sibling fta_wto fit2, absorb(imp_TVFE exp_TVFE) cluster(cross_id)

                  Click image for larger version

Name:	Sin título5.png
Views:	1
Size:	35.1 KB
ID:	1529018


                  5. Finally, I run the following command and I got:

                  test fit2=0

                  ( 1) fit2 = 0

                  chi2( 1) = 8.03
                  Prob > chi2 = 0.0046



                  In this specification we can see Reset test has not passed. I have tried to add and remove some variables to improve the Reset result but it was the best result I could obtain.

                  I hope you can help me.

                  Kind regards.

                  Comment


                  • #10
                    Dear Joao Santos Silva

                    In addition, I run the same RESET test with PPML command instead of PPMLHDFE and the results were different.

                    The command I used for PPMLHDFE was:

                    1. ppmlhdfe x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony sibling fta_wto log_exchange_rate_o log_exchange_rate_d, absorb(imp_TIFE exp_TIFE) cluster(cross_id)

                    2. predict XB,xb

                    3. qui su XB

                    4. gen XB2 = (XB-r(mean))^2

                    5. quietly ppmlhdfe x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony sibling fta_wto log_exchange_rate_o log_exchange_rate_d XB2, absorb(imp_TIFE exp_TIFE) cluster(cross_id)

                    6. test XB2 = 0

                    ( 1) XB2 = 0

                    chi2( 1) = 2.64
                    Prob > chi2 = 0.1043


                    Then, the command I used for PPML was:

                    1. ppml x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony sibling fta_wto log_exchange_rate_o log_exchange_rate_d _Iexp_TIFE* _Iimp_TIFE*, cluster (cross_id)

                    2. predict XB,xb

                    3. qui su XB

                    4. gen XB2 = (XB-r(mean))^2

                    5. quietly ppml x log_distw log_gdp_o log_gdp_d log_gdpcap_o log_gdpcap_d contig colony sibling fta_wto log_exchange_rate_o log_exchange_rate_d _Iexp_TIFE* _Iimp_TIFE* XB2, cluster (cross_id)

                    6. test XB2 = 0

                    ( 1) XB2 = 0

                    chi2( 1) = 12.16
                    Prob > chi2 = 0.0005




                    Finally, I want to say that although chi2 and p values are different with PPMLHDFE and PPML command, coefficient values are the same.

                    I hope you can help me with this post and the last one Mr Santos.

                    Kind regards.

                    Carlos.



                    Comment


                    • #11
                      Dear CARLOS ABREO,

                      Thanks for posting all the results.

                      About #9, the model that does not pass the RESET is actually the model that is preferred by colleagues who work on trade. Maybe you can improve the specification by adding some of the usual controls such as dummies for common language, free trade agreements, and currency unions? Also, want is "siblings"? maybe you can change the way that variable enters the model?

                      About #10, I believe that the difference is that ppml includes the fixed effects in the fitted values and ppmlhdfe does not. Given that you have 133 countries, both approaches are probably legitimate.

                      Best wishes,

                      Joao

                      Comment


                      • #12
                        Dear Joao Santos Silva

                        Once again thanks for your help.

                        I am going to do some test with stata following your advise about adding some controls. I will let you know how it works.

                        Siblings means: Origin and destination country ever in sibling relationship (i.e. colonies from the same colonizer).

                        About #10, if both approaches are legitime, should I select RESET result from PPML or PPMLHDFE command?

                        Kind regards.

                        Carlos.

                        Comment


                        • #13
                          Dear Joao Santos Silva,

                          regarding your post #11, I have a question. When using ppmlhdfe, I know that I have to specifiy the option d in the regression command do include the fixed effects in the fitted values. Can you tell me whether I can do the same in the ppml command? I did the RESET test like this with ppml:
                          Code:
                          local controls year_* hostcountry_* origincountry_* outlier_*
                          local gravity_countrylevel lngdp_o lngdp_d lndistw abs_sk_diff lnsumgdp lnsmp_dest comcol col45 comlang_off contig xr_host xr_origin regime_dejure fd_distance ivr_dist ltowvs_dist
                          ppml total_fdi_stock `controls' `gravity_countrylevel', cluster(country_pair_encode)
                          predict fit, xb
                          gen fit2 = fit^2
                          local controls year_* hostcountry_* origincountry_* outlier_*
                          local gravity_countrylevel lngdp_o lngdp_d lndistw abs_sk_diff lnsumgdp lnsmp_dest comcol col45 comlang_off contig xr_host xr_origin regime_dejure fd_distance ivr_dist ltowvs_dist fit2
                          ppml total_fdi_stock `controls' `gravity_countrylevel', cluster(country_pair_encode)
                          test fit2 = 0
                          and like this with ppmlhdfe:

                          Code:
                          local gravity_countrylevel lngdp_o lngdp_d lndistw abs_sk_diff lnsumgdp lnsmp_dest comcol col45 comlang_off contig xr_host xr_origin regime_dejure fd_distance
                          ppmlhdfe total_fdi_stock `gravity_countrylevel', absorb(year iso3_d iso3_o outlier) d cluster(country_pair_encode)
                          predict fit, xb
                          gen fit2 = fit^2
                          local gravity_countrylevel lngdp_o lngdp_d lndistw abs_sk_diff lnsumgdp lnsmp_dest comcol col45 comlang_off contig xr_host xr_origin regime_dejure fd_distance fit2
                          ppmlhdfe total_fdi_stock `gravity_countrylevel', absorb(year iso3_d iso3_o outlier) d cluster(country_pair_encode)
                          test fit2=0
                          I would appreciate your help a lot. The RESET tests yields misspecification for the ppml-estimated model and I am not sure whether I calculate it correctly.

                          Best
                          Noemi

                          Comment


                          • #14
                            Dear Noemi Seng,

                            The test done with ppml includes the FE in the fitted values, the test done with ppmlhdfe does not. To replicate the ppml results with ppmlhdfe you need the option xbd in predict, not xb.

                            Anyway, I generally do not recommend including the FE in the fitted values because these are can be very noisy. Hence, I suggest you keep using ppmlhdfe as shown above.

                            Best wishes,

                            Joao

                            Comment


                            • #15
                              Dear Joao Santos Silva

                              thank you for your quick answer! The problem is that I need to use ppml as with ppmlhdfe, I am for some reason not able to include a certain control variable in my model (it is dropped due to multicollinearity). This is why I opt for ppml. Can you maybe tell me, whether I calculated the RESET test correctly with the ppml command in the code provided?

                              Thank you! all the best
                              Noemi

                              Comment

                              Working...
                              X