BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
haf27
Calcite | Level 5

Hi Experts,

A minor and again a possibly trivial question, how can I modify the Predicted Cumulative Probabilities plots which are part of the generated regression code? I actually just want to display the data-points values and change the chart format and legend

I ran a LOGISTIC regression with link CLOGLOG on Categorical Output and categorical inputs on EG.

The resulting code is as follows:

PROC LOGISTIC DATA=WORK.TMPMod

  PLOTS(ONLY)=EFFECT

  ;

  CLASS Old_Product (PARAM=EFFECT) Old_Price (PARAM=EFFECT) Old_Color (PARAM=EFFECT);

  BY Region;

  MODEL __RESPONSE=Old_Product Old_Price Old_Color /

  SELECTION=NONE

  LINK=CLOGLOG ;

RUN;

QUIT;

Thanks,

Best Regards,

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

In the Logistic Regression task, you can select to save the Predictions output data.  Those options are on the Predictions tab within the task.

With the output data, you can then write some code for PROC SGPLOT to create the plot that you want.  Or, you can design a plot using the menus in Tasks->Graph, or use the ODS Graphics Designer (also in Tasks->Graph) to create a new plot design.

You might need to manipulate the Predictions data a little bit to get it into the format that you need -- depending on the number of levels of your response variable and predictions.  That would require some DATA step, or perhaps a Transpose task.

If you need more guidance, I suggest:

- create the Predictions data as I described

- post an example of the predictions data in the forum, with an example/description of the plot that you're trying to create.

Chris

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

View solution in original post

2 REPLIES 2
ChrisHemedinger
Community Manager

In the Logistic Regression task, you can select to save the Predictions output data.  Those options are on the Predictions tab within the task.

With the output data, you can then write some code for PROC SGPLOT to create the plot that you want.  Or, you can design a plot using the menus in Tasks->Graph, or use the ODS Graphics Designer (also in Tasks->Graph) to create a new plot design.

You might need to manipulate the Predictions data a little bit to get it into the format that you need -- depending on the number of levels of your response variable and predictions.  That would require some DATA step, or perhaps a Transpose task.

If you need more guidance, I suggest:

- create the Predictions data as I described

- post an example of the predictions data in the forum, with an example/description of the plot that you're trying to create.

Chris

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
haf27
Calcite | Level 5

Many thanks Chris, so in other words, instead of relying on the report. I would just generate the raw probabilities data by saving the Predictions tab. Then this is just graphing the predictions, which should be fine.

Thanks again and all the best,

Hussein

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1207 views
  • 0 likes
  • 2 in conversation