turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Logit: why aren't my exponentiated coefficients eq...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 28, 2015 7:57 AM
(1362 views)

Not sure this question is really appropriate for this forum, but I'll go for it nonetheless : )

I'm running logit in JMP. My understanding is that if you exponentiate the coefficients, you get the change in odds ratios from a 1 unit change in X.

This works perfectly for continuous independent variables, but not for nominal (0,1) independent variables. Example below:

For parameter estimates I'm getting:

Term Estimate Intercept -1.516621

Gender[Female] 0.22189387

Level1 /Level2 Odds Ratio

Male Female 0.6416016

Female Male 1.5585996

Shouldn't my odds ratio for males be exp(-1.516621)=0.220486 and for females be exp(0.20461503)=1.2270525?

Befuddled by this. Would really appreciate some help. Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 28, 2015 2:12 PM
(2448 views)

Solution

hi chriscic42,

it would be more useful if you could give a data or at least the whole output.

meanwhile i suggest you define gender as ordinal and see the odds ratio makes more sense to you.

if you declare it nominal the coefficients are not contrasting one another but rather estimating the difference from the non weighted average between the categories.

if you declare it ordinal the coefficients estimate the difference between adjacent categories (in the gender case between the two) and i think that is what you are expecting to see.

running the model once with gender as nominal and once again as ordinal you are supposed to get essentially the same results in all but the coefficient for gender. using the nominal option you should get a coefficient which is half the size than the ordinal coefficient.

it is all about the way jmp constructs the contrasts between the categories.

hope this helps.

ron

4 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 28, 2015 2:12 PM
(2449 views)

hi chriscic42,

it would be more useful if you could give a data or at least the whole output.

meanwhile i suggest you define gender as ordinal and see the odds ratio makes more sense to you.

if you declare it nominal the coefficients are not contrasting one another but rather estimating the difference from the non weighted average between the categories.

if you declare it ordinal the coefficients estimate the difference between adjacent categories (in the gender case between the two) and i think that is what you are expecting to see.

running the model once with gender as nominal and once again as ordinal you are supposed to get essentially the same results in all but the coefficient for gender. using the nominal option you should get a coefficient which is half the size than the ordinal coefficient.

it is all about the way jmp constructs the contrasts between the categories.

hope this helps.

ron

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 28, 2015 6:32 PM
(1224 views)

Thank you Ron! That works!

It's a little counter-intuitive to me to treat gender like as an ordinal variable. Gender seems like the poster child for nominal. Does this mean than I should use ordinal for any two-level attribute (M/F, Married/Single, College grad/no college etc?). when running logit in JMP? When would I ever want to use nominal?

Also it seems very strange to me that when I use nominal, the coefficients appear to be "wrong" (i.e. you can't exponentiate them to get to the odds ratios) but the odds ratio still shows as the same either way (with nominal or ordinal variable). That just doesn't feel right given the way I thought the logit math works.

Sounds like you're saying this is a feature not a bug, and I don't presume to have enough knowledge to disagree, but it sure is confusing!

I'd be happy to share the data or model output (from the "wrong" version) but I can't figure out how to get it pasted in here without crazy messed up formatting.

Thanks again and let me know if you have additional thoughts!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 29, 2015 2:06 PM
(1224 views)

hi chriscic42,

Perhaps you should look at it from a wider perspective. i get the impression jmp was built thinking big. in this case about more than two categories and therefore if a variable is nominal (most primitive categories that can't be ordered) it is desirable to compare them all to an "average" category. in which case the missing coefficient can be calculated by one minus the sum of the other coefficients (or just by requesting "expanded estimates" from the menu). meanwhile, for the ordinal it makes sense comparing each category to the one above it. in this case the coefficient for the missing category is just the intercept (the constant).

in addition, from my experience it is faster to set up the "value ordering" in the table beforehand than declaring the contrasts manually within the model platform as is common practice in other statistical software.

once the weekend is over i expect you will get some more thoughts of others on the forum.

ron

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Nov 30, 2015 9:56 AM
(1224 views)

There are many ways to add the data. You could paste a screenshot directly into the forum post (which I do below) or you could use the Advanced Editor and attach the file.

Often times many people simply post the data table code/analysis code since this allows one to quickly replicate your work without having to download any files. You can get the script straight from the pop up menu in any data table: