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

i want to get an output for diagnostic graphs.

 

ods graphics on;
ods listing gpath="/home/rif_160/";
proc genmod data=SASHELP.MARGARIN descending;
class brand;
model choice=brand / dist=bin type3 link=logit;
bayes nbi=1000 nmc=10000 thin=2 seed=159 plots=trace;
run;
quit;

can someone tell me how to get the output in form of graphs???

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Your code works and creates graphs for me, so I wonder if the issue is related to SAS On Demand for Academics. I am not experienced with SODA, but since you mention "the graphs window" and "the output window" I wonder whether you have closed some ODS destinations? Try opening a destination such as HTML and see what happens. Put

 

ODS HTML;

 

prior to your procedure call.  If that doesn't work, I can move your post to a SODA forum, since your code is correct and should work.

View solution in original post

5 REPLIES 5
Rick_SAS
SAS Super FREQ

For most SAS procedures, you select plots by using the PLOTS= option on the procedure statement (in this case, the PROC GENMOD statement). The PROC GENMOD documentation tells you what keywords you can use to select plots.

 

There are many diagnostic plots, including CooksD, DFBeta, Leverage, ResChi, and ResDev. There are also diagnostic plots for the BAYES option, such as ADPanel and AutocorrPanel. A complete set of all plots, along with the statements (MODEL, BAYES, etc) that they refer to, are in the section of the doc titled  "ODS Graphics"

rif_160
Calcite | Level 5

thanks for your reply. i have seen the documents you have mentioned. but i can not see any graphs in the graphs window, results are in tabular form only in the output window. 

 

ods graphics on;
proc genmod data=SASHELP.MARGARIN descending;
class brand;
model choice=brand logprice/ dist=bin type3 link=logit;
bayes nbi=1000 nmc=10000 thin=2 seed=159 plots=autocorr;
run;
quit;

thats the code i am using. i am using SAS on Demand for Academics.  

Rick_SAS
SAS Super FREQ

Your code works and creates graphs for me, so I wonder if the issue is related to SAS On Demand for Academics. I am not experienced with SODA, but since you mention "the graphs window" and "the output window" I wonder whether you have closed some ODS destinations? Try opening a destination such as HTML and see what happens. Put

 

ODS HTML;

 

prior to your procedure call.  If that doesn't work, I can move your post to a SODA forum, since your code is correct and should work.

rif_160
Calcite | Level 5

thanks, it worked with HTML but diagnostic plots are still not displayed in HTML. they are saved separately. but sometimes i get an error message that location has no permissions to wirte although i have specified the location i am wokring in. sometimes it funcitons properly. 

Rick_SAS
SAS Super FREQ

You must be running additional statements that you are not telling us. Perhaps these are in an autoexec file or in another section of your program that you do not realize is setting global options.  At least now you know that the code is correct and that you can look elsewhere for the problem. Good luck.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 5 replies
  • 945 views
  • 0 likes
  • 2 in conversation