Announcement

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

  • Partial effects for Log-Linear model

    Dear members,

    I am currently working on my master thesis in empirics. My main goal is to investigate the newly proposed estimator for gravity equation (Flex estimator) and compare it with some other estimators. I collected data and did regression for 7 different models.

    Currently I am having a problem trying to calculate the marginal effects for Log-Linear model (for other models it was quiet simple with incorporated Stata commands).

    My dependent variable for Log-Linear model is ln(Tij) where Tij is number of sectors exporting from country i to country j (min 0; max 97), my independent variables are ln(distance) and 9 different dummies. I control using multilateral resistence terms (i.e. exporter and importer dummies).

    I should calculate the average across the entire sample of the partial effects of each of the regressors on E(Tij∣xij) so that I need the partial effects on the exponential of the fitted values of lnTij, averaged over all observations.

    I am not sure how to do this and if this particular specification of the partial effects for Log Linear model is to complicated for beginner like myself.

    Thank you in advance for any comments, insights and suggestions.

    Kind regards,

    Azira
    Last edited by azira muminovic; 29 Jun 2016, 07:16. Reason: logistic partial effects marginal loglinear

  • #2
    If you show the actual code and output for this model, it is possible that someone can show you the way from there. While your description is fairly clear, it leaves relevant details to the imagination. To be sure you report exactly the code and output, please copy/paste directly from Stata's Results window or your log file into a code block on this Forum. (See FAQ #12 for information about code blocks.)

    Comment


    • #3
      This is code which I run to get regression results

      Code:
      global x "border island landlocked colony comcurr rta comlang bothin religion"
      quietly reg lTij ldist $x exp_* imp_*, robust
      These are the results
      Click image for larger version

Name:	Screen Shot 2016-06-29 at 19.08.08.png
Views:	1
Size:	40.2 KB
ID:	1347423


      The question is basically how to get partial effects averaged over all observations.

      Last edited by azira muminovic; 29 Jun 2016, 11:13.

      Comment


      • #4
        Dear Azira,

        I am delighted to see that you are interested in "Flex"

        As for your question, to be able to compute the partial effects using a log-linear model you would need to make some (strong) assumptions about the distribution of the error term. That is known as the retransformation problem, and it is one of the big disadvantages of using models where the dependent variable is logged.

        In the paper where we introduced the "Flex" we computed partial effects using the log-linear model making some standard (but unrealistic) assumptions about the error term (this is described in the paper), but I am not sure it is worth doing that because the results will be essentially meaningless.

        Best wishes,

        Joao

        Comment


        • #5
          Dear Mr. Santos Silva,

          thank you for your enlightening informations. I am actually very excited to hear from you since I appreciate your work on trade-empirics a lot, and I have been studying it for a while.

          Your answer has really clarified a confusion which I had with LogLin so that I will rather focus on other marginal effects for comparative purposes.

          As for empirical application of Flex, I get approximately the same results as in your paper (I work with Dataset on 2-digit level of aggregation), so for an average graduate student it is simple enough to implement.

          Thanks again and good luck with your future endeavors.

          Azira

          Comment


          • #6
            Thank you, Azira. Best of luck.

            Joao

            Comment

            Working...
            X