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.
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 )));
Y( :logistic ),
Effects( :sex, :weight ),
Personality( Nominal Logistic ),
Run( Likelihood Ratio Tests( 1 ), Wald Tests( 0 ))
logfit<<save probability formula;
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :Name( "Prob" ) ), Overlay( :sex ) ),
Elements( Smoother( X, Y, Legend( 4 ) ) )