Data visualization with SAS programming

Diagnostic Statistics plot

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

Diagnostic Statistics plot

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???


Accepted Solutions
Solution
‎03-29-2017 09:03 AM
SAS Super FREQ
Posts: 3,752

Re: Diagnostic Statistics plot

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


All Replies
SAS Super FREQ
Posts: 3,752

Re: Diagnostic Statistics plot

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"

Occasional Contributor
Posts: 7

Re: Diagnostic Statistics plot

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.  

Solution
‎03-29-2017 09:03 AM
SAS Super FREQ
Posts: 3,752

Re: Diagnostic Statistics plot

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.

Occasional Contributor
Posts: 7

Re: Diagnostic Statistics plot

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. 

SAS Super FREQ
Posts: 3,752

Re: Diagnostic Statistics plot

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.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 196 views
  • 0 likes
  • 2 in conversation