BookmarkSubscribeRSS Feed
Fluorite | Level 6

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?

SAS Employee

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.

Fluorite | Level 6

Thanks for your response. I tried using the outscorelib statement the way it is demonstrated here:


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;



SAS Employee

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!


Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.


Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2 in conversation