Announcement

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

  • Gravity Model: How to predict TOTAL VALUE of dependent variable from a log-log regression

    Whilst I understand that a log-log gravity equation is the ELASTICITY of Y in relation to X, I am attempting to immotate British Treasury methodology in order to calculate the border effect between an Independent Scotland and Rest of UK.

    The Treasury claims to derive the border effect from the Treasury's own log-log model, BUT the border effect is measured thus = 1-(Predicted TOTAL Value of Exports/Actual TOTAL Value of Exports). (For example; predicted Total Exports for (year) = £4.5-.5.5bn/ Actual Total Exports 2002-2011= £32bn ) therefore border effect = 1-(4.5/32)=0.86=86% border effect.

    IN OTHER WORDS the Treasury claims to derive the TOTAL VALUE OF EXPORTS from its double-log/log-log gravity equation.

    MY QUESTION IS: How can one predict the TOTAL (I emphasise "TOTAL") VALUE OF EXPORTS from the log-log model which only measures logarithmic change/elasticity? Or put otherwise; How can the Treasury interpret the below model (lnExports = lnGDP(A) + lnGDP(B) + lnDist _Dummy(CommonLangiage)) to PREDICT TOTAL TRADE VOLUME?

    "The estimated effects of each characteristic are then applied to Scotland and the rest of the UK (given their size, proximity and common language) to calculate what trade flows"

    Click image for larger version

Name:	LinearReg.jpg
Views:	5
Size:	42.5 KB
ID:	1316696



  • #2
    Dear Michael,

    The short answer it that this is not possible. Expanding a bit, this is known as the "retransformation problem" and has been debated for decades in Health Economics (and other areas). To be able to do that you would need very strong assumptions on the error term of the regression and these assumptions are unlikely to be valid or even just reasonable. Of course, the problem does not exist if the gravity model is estimated in levels, for example using Poisson pseudo maximum likelihood (PPML).

    Best regards,

    Joao

    Comment


    • #3
      Joao

      Many thanks for your time, I haven't covered PPML in my MSc course - could you briefly tell me how I could use this to predict total trade values from aa log-log model?

      Your helps is very much appreciated

      Mike

      Comment


      • #4
        Sorry Joao - how would I employ a 'gravity model estimated in levels' to determine total trade flows if my model is ppml LnDepVar = LnIndeVar1..+2...+3 etc?

        I'm really keen to know how this works

        Best

        Mike

        Comment


        • #5
          Hi Mike,

          The gravity model is a multiplicative model that can be written as

          DepVar = exp(b0 + b1*ln(x1) + b2*ln(x2) + b3*ln(x3) + ...).

          The old approach to this is to take logs on both sides to transform this into a linear model and then estimate by OLS. This leads into all sorts of problems.

          The alternative is to estimate the model exactly as it is above, for example using the -ppml- command. In Stata that can be done as (you need to install -ppml- from ssc):

          ppml DepVar ln(x1) ln(x2) ln(x3) ...

          So, this is very much like you have been doing except that you use -ppml- in place of -reg- and the dependent variable is trade instead of log of trade. Our paper "The log of Gravity" gives the details and you can find more information here.

          All the best,

          Joao

          Comment


          • #6
            Hello Joao Santos Silva,

            I'm using PPML to estimate the determinants of bilateral trade. The estimation command is:

            "ppml DepVar X F" (Here, DepVar = volume of trade. X = list of determinants. F = list of fixed effects.)

            Now I want to obtain the predicted value of DepVar from the above model. So I've used the command:

            "predict DepVar"

            But I doubt that this only applies for linear model. I remember that I found a thread on Statalist where you suggest to use option "mu" (and sorry I could not find that thread again).

            May you confirm that the command "predict DepVar, mu" is the right way to optain predicted value of DepVar from PPML model?

            I could calculate it manually but the problem is that there are many fixed effects in my model so it would be more convenient to have an automatic command for that.

            I would appreciate very much your help in this matter.

            Comment


            • #7
              Hello,

              Indeed you can use the -predict- command with the -mu- option, which I believe is the default.

              In general it is not a good idea to write about a different subject on a preexisting thread; it is better to start a new one.

              All the best,

              Joao

              Comment


              • #8
                Great! Thank you very much!

                Comment


                • #9
                  Hello,

                  I am using PPML to estimate the determinants of export.
                  My ppml estimation commands are;


                  ppml exports_son lgdp_reporter lgdp_partner lpop_reporter lpop_partner lland_reporter lland_partner ldist colony contig comlang_off , cluster(pairid)

                  ppml exports_son lgdp_reporter lgdp_partner lpop_reporter lpop_partner lland_reporter lland_partner ldist colony contig comlang_off year_*, cluster(pairid)

                  ppml exports_son lgdp_reporter lgdp_partner lpop_reporter lpop_partner lland_reporter lland_partner ldist colony contig comlang_off year_* reporter_* partner_*,cluster(pairid)

                  xtpqml exports_son lgdp_reporter lgdp_partner lpop_reporter lpop_partner lland_reporter lland_partner ldist colony contig comlang_off year_*, fe cluster(pairid)


                  I have 2 questions,

                  1)Are the commands correct for ppml est.?

                  2) And second i want to get the predicted value of exports. But i don know which stata command /commands i need to use for prediction.

                  I will be very glad if somebodys answering my questions.

                  Best

                  Comment


                  • #10
                    This was answered in #11 here.

                    Comment


                    • #11
                      Dear Joao,

                      Could you also tell us how to extract the fixed-effects estimates from a PPML regression? I am using origin and destination fixed effects in gravity framework. I want to regress them on certain explanatory variables such as rule of law, human capital, infrastructure, etc, to understand the significance of each.

                      Hope you're keeping well.

                      Regards,
                      Saunok

                      Comment


                      • #12
                        Dear Saunock,

                        ppml does not save the fixed effects, just their coefficients. So, you would need to construct them from the output provided. You may want to check if ppnlhdfe allows you do do that in a simpler way.

                        Best wishes,

                        Joao

                        Comment


                        • #13
                          Hi Joao,

                          Many thanks for your answer. How does one recover the fixed effects from the output? I realise this may be an elementary question.

                          Regards,
                          Saunok

                          Comment

                          Working...
                          X