Announcement

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

  • Interpreting marginal effects for logged variable

    Hello,

    I am running a logit model and i have a variable in my analysis that measures population, I am using a log of population, but I am having trouble interpreting this when i run the margins command.

    i know how to interpret marginal effects for a normal continuous variable ("at the mean of X, there is an approximate increase in Y by ...%, controlling for all other variables"). But how do you interpret the marginal effects for a logged version of a variable?


    Thanks in advanced

  • #2
    Multiply the average marginal effect by, say, .1. The result is the average change in the probability when population increases by (about) 10% (because a change in the log of .1 is about a 10% increase in population). So, if the AME is .32, the probability increases by .032, or 3.2 percentage points, given a 10% increase in population. JW

    Comment


    • #3
      Hello, Alice,

      Welcome to the Stata Forum!

      When dealing with margins in logistic regression, there are many options.

      You may type - help margins - in the command window and see interesting examples.

      Also, in the Stata Base Reference Manual (release 14) you will find great explanation, as for example in page 1346:

      Adjusted predicted probability of y = 1 for each level of a when x is at its mean after
      logit y a##c.x
      margins a, atmeans
      Adjusted predicted probability for each level of the interaction of a and b, holding x at 25, after
      logit y a##b##c.x
      margins a#b, at(x=25)
      Adjusted prediction for each level of a when x = 25 and b = 1
      margins a, at(x=25 b=1)
      Hopefully it helps.


      Best,

      Marcos
      Best regards,

      Marcos

      Comment


      • #4
        Thanks for your replies!

        Comment


        • #5
          The user-written mcp command has a nice feature for letting you plot the adjusted predictions from a logged variable based on the unlogged values. See

          http://www.stata-journal.com/article...article=gr0056

          There is an example starting on p. 7 of

          http://www3.nd.edu/~rwilliam/stats3/Margins03.pdf
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 19.5 MP (2 processor)

          EMAIL: [email protected]
          WWW: https://www3.nd.edu/~rwilliam

          Comment


          • #6
            Thank you for the links! But could I just check that how i'm interpreting the results is correct? So lets say if I was running a logit analysis and after running mfx command, stata produces the following output. and I want to interpret the marginal effects of logpop. The average of logpop is approximately 17.9, so is this saying at that the mean of logpop there is approximately a 2.3% increase in Y??



            Variable dy.dx standard error p value X
            autocracy* .235668 .0961 0.257 .10231
            Conflict* .1090083 .03627 0.000 .735974
            logpop -.0230156 .131 0.047 17.9366

            Thanks in advanced!

            Comment


            • #7
              Hi Alice,

              You didn't provide details of your model, of what is "y" as well as the classification of the predictors. Neither the "exact" commands and output were posted, but only a table with selected values. However, for the interpretation, keep in mind you've got a negative value for "logpop". That said, #2, #3 and #5 provided insightful examples.

              Best regards,

              Marcos
              Best regards,

              Marcos

              Comment


              • #8
                Apologies, Y = dummy variable indicating successful and unsuccessful assassinations by terrorist organisation. and autocracy and conflict are both dummies. autocracy=1,0 and conflict=1,0. log pop is the logged population.

                I ran a logit regression and following then used mfx to get the table with the marginal effects

                Comment


                • #9
                  You didn't present the "exact" commands, unfortunately. Also, when you said you "used mfx to get the table with the marginal effects". You also didn't state which version of Stata you are working with. For - margins - has replaced - mfx - and gives further possibilities.

                  If you type in the command window "help mfx", you get this information:

                  mfx has been superseded by margins. margins can do everything that mfx did and more. margins syntax differs from mfx; see margins. mfx continues to work but does not support factor
                  variables and will often fail if you do not run your estimation command under version control, with the version set to less than 11. This help file remains to assist those who
                  encounter an mfx command in old do-files and programs.
                  [...]
                  mfx numerically calculates the marginal effects or the elasticities and their standard errors after estimation. Exactly what mfx can calculate is determined by the previous
                  estimation command and the predict(predict_option) option. The values at which the marginal effects or elasticities are to be evaluated is determined by the at(atlist) option. By
                  default, mfx calculates the marginal effects or elasticities at the means of the independent variables by using the default prediction option associated with the previous estimation
                  command.

                  Best,

                  Marcos
                  Last edited by Marcos Almeida; 25 Aug 2015, 07:30.
                  Best regards,

                  Marcos

                  Comment


                  • #10
                    thanks for letting me know, our class was told we could still use mfx, but having used the margins command I can see that the results actually differ!

                    Comment


                    • #11
                      Originally posted by Jeff Wooldridge View Post
                      Multiply the average marginal effect by, say, .1. The result is the average change in the probability when population increases by (about) 10% (because a change in the log of .1 is about a 10% increase in population). So, if the AME is .32, the probability increases by .032, or 3.2 percentage points, given a 10% increase in population. JW
                      Would interpretation with a log variable be similar for using probit (instead of logit), and then margins, dydx(*) post predict(pr)? Thanks a lot!

                      Comment

                      Working...
                      X