10-27-2016 09:18 AM
I have data on when items leave a population, I can use proc univariate to create a histogram of the data, and visually see the distribution of how long it takes for each item to leave, I can also use proc severity to fit a specifc distribution to the data. What I want to do is fit a distribution from proc severity (i.e burr distribution) to the test data, and then apply this distribution to a monthly aggregated value for what is coming into the population to determine what percentage of the aggregated inflow will leave each day. Is there a way I can do this with proc severity, or another procedure?
10-28-2016 05:02 PM
PROC SEVERITY supports OUTSCORELIB statement that enables you to create what are called "scoring functions" that you can evaluate on any data set with a fitted distribution. Please read the SAS/ETS User's Guide to know more about the OUTSCORELIB statement and post back if you have any questions.
In the context of PROC SEVERITY, 'scoring' means you can compute quantities such as CDF, PDF, etc of the the fitted distribution for a given response variable value, or mean of the distribution if it is defined and if <dist>_MEAN function appears in the libraries specified in the CMPLIB path (SASHELP.SVRTDIST contains mean functions for all predefined distributions). In the "extensibility" spirit of PROC SEVERITY, you can also define your own scoring functions.
Starting with SAS/ETS 14.2 release, which ships later this year, you will also be able to use the OUTPUT statement to "score" observations in the input (DATA=) data set. The OUTPUT statement allows you to overcome one limitation of scoring functions, which is that the scoring functions cannot be generated when your severity model contains complex scale regression effects such as CLASS variables and interactions.
10-31-2016 08:34 AM
Thanks for your response. I tried using the outscorelib statement the way it is demonstrated here: http://support.sas.com/documentation/cdl/en/etsug/67525/HTML/default/viewer.htm#etsug_severity_detai...
But SAS gives an error that says "Statement is not valid or it is used out of proper order" Here is what the code looks like that I tried:
proc severity data=data crit=aicc; loss days; dist pareto; outscorelib outlib=sasuser.fitdist; run;
10-31-2016 10:58 AM
Which version of SAS/ETS do you have? The OUTSCORELIB statement was first added as an experimental feature to the SAS/ETS 13.1 version, which shipped with SAS Foundation release 9.4M1. It became a production feature in SAS/ETS 13.2. If you have a version earlier than the 13.1 version, I would recommend ugrading to SAS/ETS 13.2 or ideally to SAS/ETS 14.1. Thanks!