BookmarkSubscribeRSS Feed
ingridf
Calcite | Level 5

 

Hello all,

 

I am using PROC SEVERITY to estimate different distributions that fit my data as such : 

 

proc severity data=&arg._ATTRI_APPREN_SEV print=allfitstats ;
   loss MNT_COUT_UNIT;
   dist _predefined_  ;
run;

My issue is that it prints everything in the Results viewer and I would just like the CDF, EDF & PDF estimation graphs and this table 

 

Capture.PNG

I looked at the procedure and found the table name, which is why I added the "allfitstats" print option BUT it still prints everything in the Results Viewer.

 

I then tried this :

 

ods graphics on;
ods select AllFitStatistics ;
proc severity data=&arg._ATTRI_APPREN_SEV ;
loss MNT_COUT_UNIT;
dist _predefined_ ;
run; 

But that just gives me an error :

 

Capture.PNG

 

Thanks in advance for the help.

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Well you can do:

ods graphics on;
ods output AllFitStatistics=AllFitStatistics;
proc severity data=&arg._ATTRI_APPREN_SEV noprint;
  loss MNT_COUT_UNIT;
  dist _predefined_;
run; 
proc print data=AllFitStatistics;
run;

Change the proc print to only output what you want.

ingridf
Calcite | Level 5

Thanks for replying, just tried and it still gives me an error telling me the data doesn't exist

 

Capture.PNG

 

I'm guessing the problem comes from 'AllFitStatistics' but I'm sure that's the table name : 

 

Capture.PNG

RW9
Diamond | Level 26 RW9
Diamond | Level 26

It tells you in the Warning message - drop the noprint from my code, then it will create the dataset.  

You will likely need to clear the results viewer:

dm 'odsresults; clear';

 

Probably simpler to just create an output file rather than use the results viewer.

ingridf
Calcite | Level 5

It printed everything except the table I want in the Results Viewer, and I still have the same error  : 

 

Capture.PNG

 

How would I create an output file?

RW9
Diamond | Level 26 RW9
Diamond | Level 26

You create an output dataset like this:

ods graphics on;
ods output AllFitStatistics=AllFitStatistics;
proc severity data=&arg._ATTRI_APPREN_SEV;
  loss MNT_COUT_UNIT;
  dist _predefined_;
run; 
proc print data=AllFitStatistics;
run;

I don't have anything to test this with, but that should create a dataset.  Also you can try the out=options listed:
http://support.sas.com/documentation/cdl/en/etsug/63939/HTML/default/viewer.htm#etsug_severity_sect0...

There are examples under the examples tab.

ingridf
Calcite | Level 5

Tried this : 

 

ods graphics on;
proc severity data=&arg._ATTRI_APPREN_SEV /*outstat=AllFitStatistics*/;
  loss MNT_COUT_UNIT;
  dist _predefined_;
run; 
proc print data=AllFitStatistics;
run

With & without OUTSTAT and both print everything along with the table.

 

I think I'll just give up and let it as is. But the reason why I only want that specific table is because the full code is pretty long and I already have a lot in the Results View, all of which I need.

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!

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