Announcement

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

  • Endogeneity and RESET Test with PPML

    Hello,

    I'm trying to estimate trade potential for the BRICS group of countries - as in, intra-BRICS trade potential - using a gravity model and the PPML estimator. I'm generating predicted values, and then calculating trade potential by (predict-actual). My dependent variable is exports (in $USD MN), while my independents are ln(gdp) of exporter and importer, standard gravity covariates and membership in RTAs. I'm using exporter-time and importer-year fixed effects. I run this for aggregate merchandise trade and then replicate it for several products of interest. I'm using COMTRADE and CEPII gravity database to source my data.

    I have three questions here:
    1. How can I test for endogeneity in the context of the PPML estimator?
    2. How does one test for misspecification problems such as RESET test? As far as I know, RESET tests for whether a linear form of suitable for our regression analysis. Does it also work when we no longer use OLS (like in my case here)?
    3. Should I run my regression on all the relevant products of interest in one combined regression? Will that provide me with some additional insight?


    This is my code (after importing dataset):

    Code:
    egen exporter_year = group(exporter year)
    tabulate exporter_year, generate(EXPORTER_YEAR_FE)
    egen importer_year = group(importer year)
    tabulate importer_year, generate(IMPORTER_YEAR_FE)
    
    drop if exp<0
    
    ppml exp lngdp_ex lngdp_im lndistw contig comlang_off comcol col45 rta EXPORTER_YEAR_FE* IMPORTER_YEAR_FE*
    
    predict fitted
    gen potential = fitted - exp
    (252 missing values generated)
    Many thanks for your time and attention. Let me know if I should provide some extra information.

    Regards,
    Saunok

  • #2
    Dear Saunok Chakrabarty,

    First of all, I suggest that you use ppmlhsfe instead of ppml as it is much faster when you have fixed effects. As for your questions:

    1. It is not standard to test for endogeneity in this context. However, RTA is likely to be endogenous and the literature addresses that problem by including pair fixed effects.
    2. The RESET tests for functional-form misspecification in any model that depends on a linear index, which is the case with Poisson regression.
    3. You can do it, but it is probably not interesting.

    Best wishes,

    Joao

    Comment


    • #3
      Dear Joao Santos Silva,

      Thanks for your kind response. I shall use ppmlhdfe from now on, like you suggested. I have a few remaining doubts:

      1. Could you explain why it isn't standard to test for endogeneity here? I was thinking that gdp might be endogenous with respect to trade flows, and if I should instrument it with population or size.
      2. If I include pair fixed-effects, will I still be able to isolate the effect of the gravity covariates? And other variables that vary across countries? Or do you suggest I perform country-year fixed effects and pair fixed effects in separate sets of regressions?
      3. In your opinion, does it make sense for me to estimate trade potential by (predicted-actual)? Benedictis and Vicarelli (2004) calculate "in-sample trade potential", via Actual/Predicted. They used OLS estimators instead of the PPML, though.


      Regards,
      Saunok

      Comment


      • #4
        Dear Joao Santos Silva,

        I ran my regressions with ppmlhdfe, and I got the following errors. The errors didn't appear when I used just ppml, so I'm wondering where the difference is arising from. Is there some problem with the way I'm grouping the exporter-year and importer-year dummies?

        Code:
        ppmlhdfe exp lngdp_ex lngdp_im lndistw contig comlang_off comcol col45 EXPORTER_YEAR_FE* IMPORTER_YEAR_FE* 
        note: 18 variables omitted because of collinearity: EXPORTER_YEAR_FE560 EXPORTER_YEAR_FE561 EXPORTER_YEAR_FE703 EXPORTER_YEAR_FE704 IMPORT
        > ER_YEAR_FE560 IMPORTER_YEAR_FE561 IMPORTER_YEAR_FE693 IMPORTER_YEAR_FE694 IMPORTER_YEAR_FE695 IMPORTER_YEAR_FE696 IMPORTER_YEAR_FE697 IM
        > PORTER_YEAR_FE698 IMPORTER_YEAR_FE699 IMPORTER_YEAR_FE700 IMPORTER_YEAR_FE701 IMPORTER_YEAR_FE702 IMPORTER_YEAR_FE703 IMPORTER_YEAR_FE70
        > 4
        Iteration 1:   deviance = 7.8029e+06  eps = .         iters = 1    tol = 1.0e-04  min(eta) =  -4.63  P   
        Iteration 2:   deviance = 4.3813e+06  eps = 7.81e-01  iters = 1    tol = 1.0e-04  min(eta) =  -6.40      
        Iteration 3:   deviance = 3.7320e+06  eps = 1.74e-01  iters = 1    tol = 1.0e-04  min(eta) =  -8.14      
        Iteration 4:   deviance = 3.6306e+06  eps = 2.79e-02  iters = 1    tol = 1.0e-04  min(eta) =  -9.62      
        Iteration 5:   deviance = 3.6188e+06  eps = 3.28e-03  iters = 1    tol = 1.0e-04  min(eta) = -10.53      
        Iteration 6:   deviance = 3.6179e+06  eps = 2.41e-04  iters = 1    tol = 1.0e-04  min(eta) = -10.93      
        Iteration 7:   deviance = 3.6179e+06  eps = 6.77e-06  iters = 1    tol = 1.0e-04  min(eta) = -11.14      
        Iteration 8:   deviance = 3.6179e+06  eps = 2.73e-08  iters = 1    tol = 1.0e-05  min(eta) = -11.16   S  
        Iteration 9:   deviance = 3.6179e+06  eps = 2.64e-12  iters = 1    tol = 1.0e-07  min(eta) = -11.17   S O
        ------------------------------------------------------------------------------------------------------------
        (legend: p: exact partial-out   s: exact solver   h: step-halving   o: epsilon below tolerance)
        Converged in 9 iterations and 9 HDFE sub-iterations (tol = 1.0e-08)
        warning: missing F statistic; dropped variables due to collinearity or too few clusters
        Warning: Variance matrix is nonsymmetric or highly singular.
        
        
        
        PPML regression                                   No. of obs      =     44,062
                                                          Residual df     =     42,664
                                                          Wald chi2(1397) =          .
        Deviance             =  3617857.631               Prob > chi2     =          .
        Log pseudolikelihood = -1920896.933               Pseudo R2       =     0.9311

        Regards,
        Saunok

        Comment


        • #5
          Dear Saunok Chakrabarty,

          About #3:

          1. My guess is that it is because there is no obvious simple and reliable way to do it.
          2. Because you are including origin-time and destination-time fixed effects, you cannot identify the effects of country characteristics such as GDP; if you also include pair fixed effects you will only be able to identify the effect of variables such as RTA that vary by pair over time.
          3. That is something that people often do using PPML (it cannot really be done with OLS because it predicts log of trade rather than trade and in general it is not possible to go from one to the other).

          About #4, you need to familiarize yourself with the command before using it; at least read the help file before trying the command.

          Best wishes,

          Joao

          Comment


          • #6
            Dear Joao Santos Silva,

            Thank you for your kind response. Wrt #2, can you tell me if I'd be expected to include country-time fixed effects or just country fixed effects? I read the 1st chapter of Yotov et al (2016), on best practises in gravity model estimations. They stress the inclusion of country-time fixed effects, to account for multilateral resistance (among other solutions). Is there a trade-off here, in terms of whether to report the effects of country characteristics, or to account for multilateral resistance? Is one more important than the other in empirical trade research, or do they just capture different things?

            Wrt #4, I do need to read up on the commands. Thanks for the suggestion.

            Regards,
            Saunok

            Comment


            • #7
              I suggest you follow Yotov et al (2016).

              Best wishes,

              Joao

              Comment


              • #8
                Thanks Joao Santos Silva, for all your help.

                Regards,
                Saunok

                Comment

                Working...
                X