Announcement

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

  • missing observation on gravity model using PPML

    Hi everyone

    I need some enlightenment regarding the use of PPML on gravity model
    I have 18270 trade flows which mean there are 18270 samples, including 97 zero trade flows
    when I estimate with PPML

    Code:
    ppml ekspor PAIR_FE* year_* ln_yi ln_yj ln_rem_exp ln_rem_imp fta1 fta2 fta3
    but the estimation results are only 18249 so there are 21 samples excluded from the estimate, according to the picture below
    Click image for larger version

Name:	observation executed.png
Views:	1
Size:	3.3 KB
ID:	1673852

    Click image for larger version

Name:	observation excluded.png
Views:	1
Size:	10.6 KB
ID:	1673851



    I think all observations will be estimated by PPML, is there any explanation about this
    Last edited by sony vebiyanto; 17 Jul 2022, 08:28.

  • #2
    Dear sony vebiyanto,

    Those observations can be dropped because they do not contain information about the parameters of interest. Please check the help file and the references therein.

    Best wishes,

    Joao

    Comment


    • #3
      thx Joao Santos Silva but I still dont really get it
      how do I know which observations dropped by stata? what command should I use
      can I fixed it??coz as far as I know there are no missing/zero value in the observation excepts for 91 zero trade flows

      really waiting for your next answer

      Comment


      • #4
        Dear sony vebiyanto,

        Please read the help file and the references therein. Basically, there is nothing to fix and the command is estimating what you want and giving you the correct results.

        Best wishes,

        Joao

        Comment


        • #5
          ok
          Thx Mr Joao Santos Silva

          Comment


          • #6
            Dear Joao Santos Silvat

            I have a similar issue that causes a problem. I am trying to estimate an impact of regional trade agreements based on the data of 50 countries during 20 years using structural gravity model (general equilibrium approach). At first stage Stata gives good results with omitted 63 fixed effect regressors :

            Code:
            * Estimate the gravity model with a specific variable for EA
            ppml trade PAIR_FE1-PAIR_FE$NTij_1 EXPORTER_TIME_FE* IMPORTER_TIME_FE1-IMPORTER_TIME_FE$NT_yr RTA EA, iter(30) noconst
            
            note: checking the existence of the estimates
            WARNING: trade has very large values, consider rescaling
            
            Number of regressors excluded to ensure that the estimates exist: 63
            Excluded regressors:  PAIR_FE1137 PAIR_FE1145...
            But at the next stage of constructing the trade costs from the pair fixed effects Stata give an error:
            . f
            Code:
            orvalues ijt = 1 (1) $NTij_8{
                                                             qui replace PAIR_FE`ijt' = PAIR_FE`ijt' * _b[PAIR_FE`ijt']
                                                   }
            [PAIR_FE1137] not found
            r(111);
            What do people usually apply? Multiple imputation to generate missing coefficients? I feel doubt as they're multicollinear coefficients. Can you help? Thanks in advance.

            Comment


            • #7
              Dear Galym Makhmejanov,

              I am not sure if I understand what you are trying to do, so I am afraid I cannot really help. Anyway, the estimates of the missing fixed effects are generally equal to minus infinity.

              Best wishes,

              Joao

              Comment


              • #8
                Hi Joao,

                Thank you for your reply.

                At the second stage I am supposed to use the estimates of fixed effects to calculate the trade costs from the pair fixed effects. Stata gives error for the missing estimates. Should I ignore the missing estimates?

                Best regards,
                Galym
                Last edited by Galym Makhmejanov; 21 Jul 2022, 01:11.

                Comment


                • #9
                  If that is what you want to do, I am afraid I do not see any other alternative.
                  Best wishes,
                  Joao

                  Comment


                  • #10
                    Hi Joao Santos Silva
                    After doing PPML regression, how to find out the F-stat value like in OLS??
                    Code:
                    ppml ekspor PAIR_FE* year_* ln_yi ln_yj ln_rem_exp ln_rem_imp fta1 fta2 fta3, cluster (pairid)
                    In OLS fixed effect, I can use testparm command :
                    Code:
                    testparm PAIR_FE* year_* ln_yi ln_yj ln_rem_exp ln_rem_imp fta1 fta2 fta3
                    does PPML estimator apply the same thing?? I just want to know whether all independent variables affect the dependent variable simultaneously

                    Comment


                    • #11
                      Dear sony vebiyanto,

                      I did not include that feature in the ppml command because I do not find that test useful, but I believe ppmlhdfe provides such test.

                      Best wishes,

                      Joao

                      Comment


                      • #12
                        Thx Joao Santos Silva for your explanation

                        Comment

                        Working...
                        X