BookmarkSubscribeRSS Feed
Ameribrit
Calcite | Level 5

Hi Guys: can anyone give me advice on how to customize the effects plot produced by SAS in Proc Logistic.

What I am trying to do is to change the  X axis range so my predicted probabilities are across a wider range than default. I tried the following but its ignored by SAS with no error in the log, Forgive me if this is a stupid question. twamap55 is a continuous variable of mean arterial pressure scores.

 


ods graphics on;
proc logistic data=mapmerge ;
model ICU_DEATH(EVENT='Yes')=twap55 ;
UNITS twap55= -1 ;
effectplot / at(twap55=0 to 75 by 5) ;
run;
ods graphics off;

 

The output stays the same no matter what I try.

 

map_pred_plot.png

 

3 REPLIES 3
Ksharp
Super User

Calling @Rick_SAS 

 

You can use 

 

ods trace on;

proc logistic

........

ods trace off;

 

 

and get the output name of that Graph ,and save the data of Graph into a dataset ,Like:

 

ods output xxxx=have;

proc logistic...

 

After that using proc sgplot to customize your real Graph .

Ameribrit
Calcite | Level 5

thanks for the advice but I'm not sure how to do as you suggest. I ran the proc with ods trace on and I get a bunch of stuff in the log one of which is  something resembling effects plot but not sure what to do with it or how to grab it.

thanks

Francis

 

Output Added:
-------------
Name: FitStatistics
Label: Fit Statistics
Template: Stat.Logistic.FitStatistics
Path: Logistic.FitStatistics
-------------

Output Added:
-------------
Name: GlobalTests
Label: Global Tests
Template: Stat.Logistic.GlobalTests
Path: Logistic.GlobalTests
-------------

Output Added:
-------------
Name: ParameterEstimates
Label: Parameter Estimates
Template: Stat.Logistic.ParameterEstimates
Path: Logistic.ParameterEstimates
-------------

Output Added:
-------------
Name: Association
Label: Association Statistics
Template: Stat.Logistic.Association
Path: Logistic.Association
-------------

Output Added:
-------------
Name: CLoddsWald
Label: 95% Clodds=Wald
Template: Stat.Logistic.CloddsWald
Path: Logistic.CLoddsWald
-------------

Output Added:
-------------
Name: ORPlot
Label: 95% Clodds=Wald Plots
Template: Stat.Logistic.Graphics.ORPlot
Path: Logistic.ORPlot
-------------

Output Added:
-------------
Name: FitPlot
Label: Fit Plot 1
Template: Stat.Logistic.Graphics.FitPlot
Path: Logistic.EffectPlots.EffectPlots.FitPlot
-------------
NOTE: The LOGISTIC procedure generated the model item store WORK.LOGIMODEL.
NOTE: There were 277 observations read from the data set WORK.MAPMERGE.
NOTE: PROCEDURE LOGISTIC used (Total process time):
real time 0.54 seconds
cpu time 0.28 seconds

Ksharp
Super User

The last one .

 

ods output FitPlot=have;

proc logistic...

 

 

And use have table to plot the graph you need .

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1877 views
  • 0 likes
  • 2 in conversation