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,
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
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
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
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.
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.