Announcement

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

  • Average predictive margins/predictive margins at means

    Dear all,

    I am using the margins command from Stata 12 in my study. However, I have some doubts.
    What is the difference between average predictive margins and predictive margins atmeans?
    When a use the commands as follows:

    Code:
    margins, predict(xb)
    Code:
    margins, predict(xb) atmeans
    I get the same value, but when a use the following commands:

    Code:
    margins
    Code:
    margins, atmeans
    I get different values. I know that in the first command the logit(p) is the average response of the group composed by all the observations and that in the second the logit (p) is determined fixing the values of the explanatory variables at the mean value.

    ​Thanks in advance.

    Best regards,

    Liza Vieira
    Last edited by Liza; 25 Nov 2014, 07:48.

  • #2
    Originally posted by Liza View Post
    I know that in the first command the logit(p) is the average response of the group composed by all the observations and that in the second the logit (p) is determined fixing the values of the explanatory variables at the mean value.
    I am unclear which of the four commands (not two) that you are referring to here. Assuming that you are applying the margins command after logit in all these cases, observe that the output can refer to either (changes/differences in) predicted probabilities or in the linear predictor (called using the predict(xb) option). This is a different issue from the contrast between the "Average response" (individual-specific predictions that are then averaged over all individuals) versus the "response at the average values of the predictors".
    For a superlative introduction to margins, search for the online notes by Rich Williams (Sociology, Notre Dame University).

    Comment


    • #3
      Dear Stephen Jenkins,

      thanks for your response. I was referring to the command :

      Code:
      margins
      as the first command and to the command:

      Code:
      margisn, atmeans
      as the second.

      Best regards,

      Liza Vieira


      Comment


      • #4
        For the linear predictor (predict(xb)) there is no difference between the two, but for predicted probabilities there is a difference. For a pre-margins discussion of this phenomenon see:

        M.L. Buis (2007), "predict and adjust with logistic regression", The Stata Journal, 7(2), pp. 221-226.
        http://www.stata-journal.com/article...article=st0127
        ---------------------------------
        Maarten L. Buis
        University of Konstanz
        Department of history and sociology
        box 40
        78457 Konstanz
        Germany
        http://www.maartenbuis.nl
        ---------------------------------

        Comment


        • #5
          Dear Maarten Buis,

          many thanks for your response. The article was very useful in understanding my results.

          Best regards,

          Liza Vieira

          Comment


          • #6
            I am not sure why you would want to use margins with predict(xb) after having run logit. In any event you need to be consistent when comparing results. For a discussion of margins (and also the very helpful mcp command) see

            http://www3.nd.edu/~rwilliam/stats/Margins01.pdf

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

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

            Comment

            Working...
            X