SEVSELECT Procedure

Example 26.4 Fitting Distributions to Interval-Censored Data

In some applications, the data available for modeling might not be exact. A commonly encountered scenario is the use of grouped data from an external agency, which for several reasons, including privacy, does not provide information about individual loss events. The losses are grouped into disjoint bins, and you know only the range and number of values in each bin. Each group is essentially interval-censored, because you know that a loss magnitude is in certain interval, but you do not know the exact magnitude. This example illustrates how you can use PROC SEVSELECT to model such data.

The following DATA step generates sample grouped data for dental insurance claims, which is taken from Klugman, Panjer, and Willmot (1998):

/* Grouped dental insurance claims data (Klugman, Panjer, and Willmot 1998) */
data gdental;
   input lowerbd upperbd count @@;
   datalines;
0 25 30  25 50 31  50 100 57  100 150 42  150 250 65  250 500 84
500 1000 45  1000 1500 10  1500 2500 11  2500 4000 3
;
run;

To analyze small data sets such as this, you might want to restrict the number of workers that are used by PROC SEVSELECT by submitting the following statements:

   cas mysess terminate;
   cas mysess sessopts=(nworkers=1);
   libname mylib cas sessref=mysess;

The first CAS statement terminates the current CAS session named mysess. It also clears the mylib libref that was associated with the session. The second CAS statement creates another session that uses only one worker of the server. The LIBNAME statement associates the mylib libref with the new session. For more information about the CAS statement and the CAS LIBNAME engine, see SAS Cloud Analytic Services: User’s Guide.

If you want to load a SAS data set into a data table on the CAS server, then it is recommended that you restrict the number of workers before you load the data set. If you restrict the number of workers after you load the data, then PROC SEVSELECT needs to redistribute the data table so that it resides on the restricted number of workers; this can cause unnecessary deterioration of performance.

You can use a DATA step as follows to load the data set Work.Gdental into a data table in your session that is associated with the mylib libref. The DATA step assumes that your libref is named mylib, but you can substitute any appropriately defined libref.

data mylib.gdental;
   set gdental;
run;

The following PROC SEVSELECT step fits all the predefined distributions to the data in the mylib.Gdental data table:

/* Fit all predefined distributions */
proc sevselect data=mylib.gdental edf=turnbull print=all criterion=aicc;
   loss / rc=lowerbd lc=upperbd;
   weight count;
   dist _predef_;
run;

The EDF= option in the PROC SEVSELECT statement specifies that the Turnbull’s method be used for EDF estimation. The LOSS statement specifies the left and right boundaries of each group as the right-censoring and left-censoring limits, respectively. The variable count records the number of losses in each group and is specified in the WEIGHT statement. Note that no response variable is specified in the LOSS statement, which is allowed as long as each observation in the input data table is censored.

Some of the key results that PROC SEVSELECT produces are shown in Output 26.4.1. According to the "Model Selection" table in Output 26.4.1, all distribution models have converged. The "All Fit Statistics" table in Output 26.4.1 indicates that the exponential distribution (EXP) has the best fit for data according to a majority of the likelihood-based statistics and that the Burr distribution (BURR) has the best fit according to all the EDF-based statistics.

Output 26.4.1: Statistics of Fit for Interval-Censored Data

The SEVSELECT Procedure

Model Selection
DistributionConvergedAICCSelected
BurrYes51.41112No
ExpYes44.64768Yes
GammaYes47.63969No
IgaussYes48.05874No
LognYes47.34027No
ParetoYes47.16908No
GpdYes47.16908No
WeibullYes47.47700No

All Fit Statistics
Distribution-2 Log
Likelihood
AICAICCSBCKSADCvM
Burr41.41112*47.4111251.4111248.318880.08974*0.00103*0.0000816*
Exp42.1476844.14768*44.64768*44.45026*0.264120.099360.01866
Gamma41.9254145.9254147.6396946.530580.195690.046080.00759
Igauss42.3444546.3444548.0587446.949620.345140.123010.02562
Logn41.6259845.6259847.3402746.231150.168530.018840.00333
Pareto41.4548045.4548047.1690846.059970.114230.007390.0009084
Gpd41.4548045.4548047.1690846.059970.114230.007390.0009084
Weibull41.7627245.7627247.4770046.367890.172380.032930.00472
Asterisk (*) denotes the best model in the column.


When the best distributions that are chosen by the likelihood-based and EDF-based statistics are different, you need to decide which fit statistic best represents your objective. In this example, if your objective is to minimize the distance between EDF and CDF values, then you should choose the Burr distribution. On the other hand, if your objective is to maximize the likelihood of the observed data while minimizing the model complexity, then you should choose the exponential distribution. Note that the exponential distribution has worse (lower) raw likelihood than the Burr distribution, but it has better AIC, AICC, and SBC statistics than the Burr distribution because the exponential distribution has only one parameter compared to the three parameters of the Burr distribution. Further, the small sample size of 10 helps accentuate the role of model complexity in the AIC, AICC, and SBC statistics. If the sample size would have been larger, the exponential distribution might not have won according to the likelihood-based statistics.

Last updated: July 09, 2026