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
- :
- Logistic Regression with Categorical Covariate

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

Apr 16, 2012 8:37 AM
(996 views)

I am fitting a logistic regression with two covariates , one continuous (say, weight) and the other nominal (say, Gender). I want to plot the probability of success against the weights for Males and Females within the sample plot, i.e., two probability curves within the same plot, one for males and the other for females. I am having trouble figuring out how to do this. Any help is very much appreciated.

Thanks in advance.

2 REPLIES

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

Apr 16, 2012 9:50 AM
(708 views)

You can pick "save probability formula" under the red triangle in the fit model report. Then plot the fitted probabilities using e.g graph builder and use the nominal variable as overlay.

Here is a script example that goes through the steps:

dt = Open**(** "$ENGLISH_SAMPLE_DATA/Big Class.jmp" **)**;

//create dummy binary column only for this example

dt<<new column**(**"logistic", nominal, formula**(**If**(** :height > **63**, **1**, **0** **)))**;

logfit=Fit Model**(**

Y**(** :logistic **)**,

Effects**(** :sex, :weight **)**,

Personality**(** Nominal Logistic **)**,

Run**(** Likelihood Ratio Tests**(** **1** **)**, Wald Tests**(** **0** **))**

**)**;

logfit<<save probability formula;

Graph Builder**(**

Show Control Panel**(** **0** **)**,

Variables**(** X**(** :weight **)**, Y**(** :Name**(** "Prob[1]" **)** **)**, Overlay**(** :sex **)** **)**,

Elements**(** Smoother**(** X, Y, Legend**(** **4** **)** **)** **)**

**)**;

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

Apr 17, 2012 5:28 AM
(708 views)