Announcement

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

  • Predicted probabilities at the mean for continuous variables

    Hi,

    I am stata beginner and running logit regressions. I am trying to compare the predicted probabilities for the average individual for two different specifications. I want to compute the % change in predicted probabilities for the average individual when I use different specifications. However, I have not been able to find a good way of doing so.

    So far this is what I have done.

    I first run a logit regression. I can calculate the predicted probabilities for the whole sample and take the mean for both specifications.
    sysuse auto, clear logit foreign price mpg rep78 predict pa, pr su pa logit foreign price mpg predict pb, pr su pb gen a = (p1-p2)/p1 I can calculate the % change and take the mean, but this is not what I want. Instead, I want something equivalent to a "atmeans" option for the predict command. Based on https://www3.nd.edu/~rwilliam/stats/Margins01.pdf,

    I think I want to estimate Adjusted Predictions at Representative Values. So I use

    margins rep78, atmeans

    which generates an error because rep78 is not a factor variable.

    Is there an alternative for continuous variables?

    To be perfectly clear, I want the following

    logit(b0 + b1*(price at mean) + b2*(mpg at mean) + b3*(rep78 at mean))
    and
    logit(b0 + b1*(price at mean) + b2*(mpg at mean))


    Thank you.

    Elliot

    ***** I found the solution

    I can simply run

    margins, atmeans

    for both specifications and calculate the % change.
    Last edited by Elliot Oh; 29 Jan 2018, 15:24.

  • #2
    When working with continuous variables, I am quite fond of Patrick Royston's mcp (marginscontplot) command. I discuss it at

    https://www3.nd.edu/~rwilliam/xsoc73994/Margins03.pdf

    There are other recently-updated articles discussing margins at

    https://www3.nd.edu/~rwilliam/xsoc73994/index.html

    -------------------------------------------
    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