+ Reply to Thread
Results 1 to 3 of 3

Thread: Creating predicted probabilities from a categorical IV in a logit (with syntax)

  1. #1
    Points: 10, Level: 1
    Level completed: 19%, Points required for next Level: 40

    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Creating predicted probabilities from a categorical IV in a logit (with syntax)




    So. I have a binary outcome that is begin predicted by a race IV which has 4 categories.

    here is my output:

    LOGISTIC REGRESSION VARIABLES yesORno

    /METHOD=ENTER race_eth

    /CONTRAST (race_eth)=Simple(1)

    /PRINT=GOODFIT CI(95)

    /CRITERIA=PIN(0.05) POUT(0.10) ITERATE(20) CUT(0.5).

    All racial categories are significant Betas follow:

    Race1 comparison group

    Race2 .175

    Race3 .263

    Race4 .808

    Constant -.650

    Here is the syntax I am using to create the predicted probabilities:

    compute pred_logit2 = -.650 + .175*(race_eth=2).
    compute pred_logit3 = -.650 + .263*(race_eth=3).
    compute pred_logit4 = -.650 + .808*(race_eth=4).

    compute dp1 = exp(pred_logit2).
    compute dp2 = exp(pred_logit3).
    compute dp3 = exp(pred_logit4).
    compute dp4 = 1.

    compute denom = dp1 +dp2+dp3+dp4.

    compute pp1 = dp1/denom.
    compute pp2 = dp2/denom.
    compute pp3 = dp3/denom.
    compute pp4 = dp4/denom.

    execute.


    HOWEVER,

    the predicted probabilities I am getting go like this

    Race1 38% comparison group

    Race2 20%

    Race3 21%

    Race4 21%

    And this feels like I am making an error some where, since all three of the non-comparison groups are reporting almost the exact same predicted probabilities.

    Thoughts / help?
    Last edited by jsayn; 07-09-2015 at 02:36 PM.

  2. #2
    Omega Contributor
    Points: 38,289, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,992
    Thanks
    397
    Thanked 1,185 Times in 1,146 Posts

    Re: Creating predicted probabilities from a categorical IV in a logit (with syntax)

    Not sure what program you are using but typically

    Log_odds: appropriate beta coefficients are summed.
    odds: exp(Log_odds)
    predicted probability: odds /(1 + odds)
    Last edited by Dason; 07-09-2015 at 04:02 PM. Reason: Fixed a parenthesis issue so that the predicted probability was actually correct.
    Stop cowardice, ban guns!

  3. The Following User Says Thank You to hlsmith For This Useful Post:

    jsayn (07-09-2015)

  4. #3
    Points: 10, Level: 1
    Level completed: 19%, Points required for next Level: 40

    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Creating predicted probabilities from a categorical IV in a logit (with syntax)


    Really I just wanted another set of eyes on it. Like I said, I found it strange that all three of my categorical predictors were returning very similar predictive probabilities.

    I appreciate the once over though. I don't wanna take these results up high just to make some bad recommendations.

+ Reply to Thread

           




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats