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

1. ## 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?

2. ## 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)

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

jsayn (07-09-2015)

4. ## 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.

 Tweet

#### Posting Permissions

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