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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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