SEVSELECT Procedure

Example 26.7 Scale Regression Model Selection

This example extends Example 26.6: Scale Regression with Rich Regression Effects to illustrate the model selection features of the SEVSELECT procedure. There are two phases of model selection when you fit a scale regression model. First, you want to select an optimal set of regression effects for each distribution’s scale regression model. The SELECTION statement provides several methods to do that. Second, you want to identify the best severity distribution by comparing the final selected scale regression models for each distribution. PROC SEVSELECT displays tables to help you do that.

The following SEVSELECT step uses the same data table as in Example 26.6 to find the best set of scale regression effects for three severity distributions—lognormal (Logn), Burr, and Weibull:

proc sevselect data=mylib.losses outest=mylib.est print=all;
   loss lossAmount / lt=deductible rc=limit;
   class carType gender education;
   scalemodel carType gender carSafety income education*carType
              income*gender carSafety*income;
   selection;
   dist logn burr weibull;
   output out=mylib.score copyvars=(carType gender education carSafety income)
          functions=(mean) quantiles=(points=0.5 0.975 names=(median var));
run;

The SELECTION statement without any options uses the stepwise selection method by default. PROC SEVSELECT reports the settings of the selection process in the "Selection Information" table, as shown in Output 26.7.1.

Output 26.7.1: Selection Method Settings

The SEVSELECT Procedure
 
Logn Distribution

Selection Information
Selection MethodStepwise
Select CriterionSBC
Stop CriterionSBC
Effect Hierarchy EnforcedNone
Stop Horizon3


For each severity distribution, PROC SEVSELECT reports the summary of the selection process, as shown in Output 26.7.2 for the lognormal distribution. The "Selection Summary" table shows the order in which regression effects enter or leave the model. In this case, no effect leaves the model after entering the model. In the first step, PROC SEVSELECT fits seven models, each with an intercept and one of the seven eligible effects in the SCALEMODEL statement. The model that contains the intercept and carType*education effect has the lowest value of the Schwarz Bayesian criterion (SBC) statistic in the first step, and hence it enters the model. In the second step, PROC SEVSELECT compares the model that does not contain the existing effect, carType*education, with models that contain that effect and one of the remaining six effects. The model that contains the intercept, carType*education, and carSafety effects is the best in the second step according to the SBC statistic. The process of removing an effect from the model or adding an effect that is not in the model continues until the stop criterion does not improve or the stop horizon condition is met. As the results in Output 26.7.2 show, the optimal value of the SBC criterion is achieved in the fourth step. The final scale regression model for the lognormal distribution contains the following effects: intercept, gender, carSafety, carType*education, and income*gender.

Output 26.7.2: Stepwise Selection Summary for the Lognormal Distribution

The SEVSELECT Procedure
 
Logn Distribution
Selection Details

Selection Summary
StepEffect
Entered
Number
Effects In
SBC
0Intercept135975.2456
1carType*education234121.0008
2carSafety333709.8419
3income*gender433298.5871
4gender533159.7903*
* Optimal Value Of Criterion

Stepwise selection stopped because adding or removing an effect does not improve the SBC criterion.

The model at step 4 is selected.

Selected Effects:Intercept gender carSafety carType*education income*gender


The selection summary information for the Weibull distribution is shown in Output 26.7.3. It shows that the best model in the sixth step is obtained by removing the carSafety*income effect, which was added in the second step. The model in the sixth step also has the lowest value of the SBC criterion; hence, it is the best model and contains the following effects: intercept, gender, carSafety, income, and carType*education.

Output 26.7.3: Stepwise Selection Summary for the Weibull Distribution

The SEVSELECT Procedure
 
Weibull Distribution
Selection Details

Selection Summary
StepEffect
Entered
Effect
Removed
Number
Effects In
SBC
0Intercept 136381.5042
1carType*education 234477.5474
2carSafety*income 334092.5186
3gender 433684.7598
4carSafety 533573.1854
5income 633517.6460
6 carSafety*income533509.5021*
* Optimal Value Of Criterion

Stepwise selection stopped because adding or removing an effect does not improve the SBC criterion.

The model at step 6 is selected.

Selected Effects:Intercept gender carSafety income carType*education


PROC SEVSELECT reports the optimization summary, fit statistics, and parameter estimates for the final selected model of each severity distribution. The results for the lognormal distribution are shown in Output 26.7.4. The "Parameter Estimates" table shows that all regression parameters in the final model are statistically significant. Comparison of these parameter estimates with those in Output 26.6.4, which were obtained without using the SELECTION statement, shows that the statistically insignificant effect, carSafety*income, is not present in the final selected model. The comparison also shows that the stepwise selection process prefers income*gender effect over the income effect and, because of the exclusion of the income effect, the income*gender effect has become statistically significant.

Output 26.7.4: Selected Scale Regression Model for the Lognormal Distribution

Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.

Optimization Summary
Optimization TechniqueTrust Region
Iterations5
Function Calls14
Log Likelihood-16533.05056

Fit Statistics
-2 Log Likelihood33066
Akaike's Information Criterion33088
Corrected Akaike's Information Criterion33088
Schwarz's Bayesian Information Criterion33160
Kolmogorov-Smirnov Statistic11.00535
Anderson-Darling Statistic649.55145
Cramer-von Mises Statistic54.77368

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Mu15.095490.03326153.18<.0001
Sigma10.569240.0081170.18<.0001
gender Female10.431620.0351612.28<.0001
gender Male00...
carSafety1-0.835970.03574-23.39<.0001
carType SUV * education AdvancedDegree11.024580.0511520.03<.0001
carType SUV * education College11.401660.0351639.87<.0001
carType SUV * education High School10.642070.0327319.61<.0001
carType Sedan * education AdvancedDegree1-0.547840.03836-14.28<.0001
carType Sedan * education College1-0.346210.02861-12.10<.0001
carType Sedan * education High School00...
income * gender Female1-0.344660.03490-9.88<.0001
income * gender Male1-0.360930.03588-10.06<.0001


After the effect selection process chooses the best scale regression model for each severity distribution, the next phase of model selection is to compare the final models across all severity distributions and identify the best severity distribution. You can do that by using the "All Fit Statistics" table, which helps you compare the final selected models according to all the fit statistics. For this example, Output 26.7.5 compares the final models of the three severity distributions—lognormal, Burr, and Weibull.

Output 26.7.5: Comparison of the Selected Scale Regression Models for Different Severity Distributions

All Fit Statistics
Distribution-2 Log
Likelihood
AICAICCSBCKSADCvM
Logn33066*33088*33088*33160*11.00535649.5514554.77368
Burr3310033124331253320311.28423519.64162*55.03613
Weibull3342433444334443351010.39183*756.7710836.41622*
Asterisk (*) denotes the best model in the column.


The lognormal distribution’s final selected model is the best according to all the likelihood-based statistics, the Burr distribution’s final selected model is the best according to the Anderson-Darling (AD) statistic, and the Weibull distribution’s final selected model is the best according to the Kolmogorov-Smirnov (KS) and Cramér–von Mises (CvM) statistics. You can choose the fit statistic that is most suitable for your application and use it to identify the best severity distribution. Alternatively, if your goal is to estimate some loss distribution statistic, such as the value-at-risk (VaR), for a particular scenario, then instead of choosing one severity distribution, you might want to compute and compare the desired statistic for the final scale regression model of each severity distribution that wins according to at least one fit statistic. The OUTPUT statement is useful for such evaluation, because it helps you score each observation of the input data table that you specify in the DATA= option. In the context of PROC SEVSELECT, scoring an observation is equivalent to computing particular statistics for the severity distribution of the losses. The previous PROC SEVSELECT step specifies the following OUTPUT statement to write the scores for each observation to the mylib.Score output table:

output out=mylib.score copyvars=(carType gender education carSafety income)
       functions=(mean) quantiles=(cdf=0.5 0.975 names=(median var));

When you specify the scale regression model, the scale parameter of each severity distribution depends on the values of the regression effects in the final selected model of that distribution. For each observation in the input table, PROC SEVSELECT computes the estimate of the scale parameter and uses it to evaluate the scoring and quantile functions that you specify in the FUNCTIONS= and QUANTILES= options, respectively. The OUTPUT statement of this example specifies that three statistics be computed for the final model of each severity distribution: the mean scoring function and two quantile functions, upper Q Subscript dist Baseline left-parenthesis 0.5 comma ModifyingAbove normal upper Theta With caret right-parenthesis and upper Q Subscript dist Baseline left-parenthesis 0.975 comma ModifyingAbove normal upper Theta With caret right-parenthesis, where upper Q Subscript dist Baseline left-parenthesis p comma normal upper Theta right-parenthesis denotes the value of the quantile function for a distribution dist that is evaluated at the CDF value of p for the estimated distribution parameters ModifyingAbove normal upper Theta With caret. The variable that contains the estimate of the mean function is named mean. The variables that contain the quantile function estimate for p=0.5 and p=0.975 are named median and var, respectively; var denotes the value-at-risk (VaR). In order to compute a function F in the FUNCTIONS= option, for each severity distribution dist, the dist_F function must be available in the function library search path that you specify in the CMPLIB= system option. Also, in order to compute the quantile functions faster, it is recommended that the dist_QUANTILE function be available in the CMPLIB= search path. If PROC SEVSELECT does not find a quantile function’s definition, it computes the quantile function by numerically inverting the cumulative distribution function (CDF). For each predefined distribution, such as the lognormal, Burr, and Weibull distributions of this example, the dist_MEAN and dist_QUANTILE functions are already defined and available to you in the function library, Sashelp.Svrtdist, that PROC SEVSELECT includes by default.

Output 26.7.6, Output 26.7.7, and Output 26.7.8 compare the estimates of the mean, median, and value-at-risk (var), respectively, of the three severity distributions for the first 10 observations that are fetched from the mylib.Score table. Note: The estimates are all available in the same table but are shown here separately for better comparison among different severity distributions. These results illustrate the following:

  • The OUT= data table contains the variables that you specify in the COPYVARS= option. This helps you associate the scoring statistics with the values of the regression effects that decide the severity distribution’s scale parameter.

  • The estimates of a particular statistic vary by observation, because the scale parameter value depends on the values of the regression effects. You can interpret the estimate of the mean as the average loss that a particular policyholder will incur if he or she has the characteristics that are quantified in the values of the regression effects. For example, the fifth observation in Output 26.7.6 shows that a male policyholder with a college degree who earns 0.70732 on a normalized scale and drives a sport utility vehicle (SUV) that has a normalized car safety rating of 0.8446 is expected to incur an average loss of 298 units if you use the lognormal distribution’s selected scale regression model for estimation, or an average loss of 283 units if you use the Weibull distribution’s selected scale regression model for estimation.

    Output 26.7.6: Estimates of the Mean for Final Models of All Severity Distributions

    ObsgendereducationincomecarTypecarSafetyLogn_MEANBurr_MEANWeibull_MEAN
    1MaleCollege1.00896SUV0.85747264.595279.531249.048
    2FemaleCollege0.52584SUV0.84267495.276514.365481.811
    3FemaleHigh School0.15000SUV0.84062264.218270.823268.200
    4MaleAdvancedDegree0.51942Sedan0.0141090.95993.35888.674
    5FemaleAdvancedDegree1.27245SUV0.84238262.683272.801241.754
    6FemaleCollege1.12252Sedan0.8115372.06974.22069.784
    7FemaleCollege0.38431Sedan0.36374135.151137.595133.730
    8FemaleHigh School0.49503SUV0.69762264.384272.216263.578
    9FemaleCollege0.98769SUV0.06408809.817844.885758.977
    10MaleCollege0.67508Sedan0.1441794.36197.07990.119


  • The estimates of the median, which is a robust estimate of the central tendency, vary less across different severity distributions. So you might want to use the median loss to predict the average loss that a policyholder will incur.

    Output 26.7.7: Estimates of the Median for Final Models of All Severity Distributions

    ObsgendereducationincomecarTypecarSafetyLogn_MEDIANBurr_MEDIANWeibull_MEDIAN
    1MaleCollege1.00896SUV0.85747225.018228.080227.398
    2FemaleCollege0.52584SUV0.84267421.196419.690439.925
    3FemaleHigh School0.15000SUV0.84062224.698220.975244.884
    4MaleAdvancedDegree0.51942Sedan0.0141077.35476.17480.966
    5FemaleAdvancedDegree1.27245SUV0.84238223.392222.589220.737
    6FemaleCollege1.12252Sedan0.8115361.28960.55963.718
    7FemaleCollege0.38431Sedan0.36374114.936112.269122.104
    8FemaleHigh School0.49503SUV0.69762224.839222.112240.665
    9FemaleCollege0.98769SUV0.06408688.689689.375692.997
    10MaleCollege0.67508Sedan0.1441780.24779.21182.285


  • The estimates of the value-at-risk (var), which depend on the heaviness of the tail of the distribution, vary significantly across severity distributions. For this example, the fitted Burr and Weibull distributions have the heaviest and lightest tails, respectively, among the three severity distributions. The VaR statistic is typically used to assess the worst-case loss that a policyholder might incur. You can interpret it as follows for the ninth observation in Output 26.7.8: for a female policyholder with an advanced degree who earns 0.60157 and drives a sedan with a car safety rating of 0.69361, the probability that she will incur a loss greater than 228 units is 2.5% if you use the Burr distribution’s scale regression model for estimation. You can add a CDF value of 0.995 to the CDF= suboption of the QUANTILES= option to get another value-at-risk estimate, which estimates a more extreme loss that a policyholder might incur with a probability of only 0.5%, but you might need to be prepared to cover that loss depending on the policy provisions.

    Output 26.7.8: Estimates of the Value-at-Risk (VaR) for Final Models of All Severity Distributions

    ObsgendereducationincomecarTypecarSafetyLogn_VARBurr_VARWeibull_VAR
    1MaleCollege1.00896SUV0.85747686.68801.10585.53
    2FemaleCollege0.52584SUV0.842671285.351474.101132.77
    3FemaleHigh School0.15000SUV0.84062685.71776.14630.55
    4MaleAdvancedDegree0.51942Sedan0.01410236.06267.55208.48
    5FemaleAdvancedDegree1.27245SUV0.84238681.72781.81568.38
    6FemaleCollege1.12252Sedan0.81153187.03212.71164.07
    7FemaleCollege0.38431Sedan0.36374350.75394.33314.41
    8FemaleHigh School0.49503SUV0.69762686.14780.14619.69
    9FemaleCollege0.98769SUV0.064082101.662421.331784.40
    10MaleCollege0.67508Sedan0.14417244.89278.22211.88


PROC SEVSELECT always includes the intercept in all scale regression models, so the selection process never attempts to fit a model without an intercept. In addition to the intercept, you can force other regression effects to be included in each selected model by specifying the INCLUDE= option in the SCALEMODEL statement. The following SEVSELECT step illustrates this by forcing the carSafety effect into every selected model:

proc sevselect data=mylib.losses outest=mylib.est print=all;
   loss lossAmount / lt=deductible rc=limit;
   class carType gender education;
   scalemodel carType gender carType*gender carSafety income education
              income*gender carSafety*income / include=(carSafety);
   selection method=forward(stop=aicc) hierarchy=single stophorizon=2 details=all;
   dist logn weibull;
run;

The various options in the SELECTION statement do the following:

  • The METHOD=FORWARD option specifies that the forward elimination method of selection be used.

  • The HIERARCHY=SINGLE option instructs PROC SEVSELECT not to add an interaction effect to the model until all the main effects in the interaction are already in the model.

  • The STOPHORIZON=2 option specifies that the STOP= criterion, which is the corrected Akaike’s information criterion (AICC), must worsen for two steps in order for a local extremum to be detected.

  • The DETAILS=ALL option displays details of all the steps of the selection process.

The "Selection Information" table in Output 26.7.9 summarizes the selection settings.

Output 26.7.9: Selection Method Settings for Forward Selection

The SEVSELECT Procedure
 
Logn Distribution

Selection Information
Selection MethodForward
Select CriterionSBC
Stop CriterionAICC
Effect Hierarchy EnforcedSingle
Stop Horizon2


The selection summary for the lognormal distribution, shown in Output 26.7.10, illustrates the following:

  • The model at step 0 includes both the intercept and carSafety effects. The carSafety effect always stays in the model.

  • Because of the HIERARCHY=SINGLE option, the carType*gender interaction effect does not enter the model until the model contains both main effects (carType and gender) that constitute it. Similarly, the carSafety*income interaction effect between two continuous effects also does not enter the model before both carSafety and income are in the model.

  • The stop criterion keeps improving for several steps, so even the smaller stop horizon of 2 does not affect the selection process for the lognormal distribution. The selection stops when all effects are in the model.

  • The final model is chosen by the optimal value of the STOP= criterion, because the CHOOSE= option is not specified. For the lognormal distribution, it is the model at step 6, which contains all regression effects except the income*gender effect. If you had specified the CHOOSE=SBC option, then the final model would be the model in step 4 that excludes carType*gender, carSafety*income, and income*gender effects, because it has the smallest value for the SBC criterion.

Output 26.7.10: Forward Selection Summary for the Lognormal Distribution

The SEVSELECT Procedure
 
Logn Distribution
Selection Details

Selection Summary
StepEffect
Entered
Number
Effects In
AICC SBC
0Intercept1  
 carSafety235766.604435786.1512
1carType334230.477134256.5378
2gender433895.022233927.5962
3income533656.765533695.8519
4education633594.698933646.8076*
5carType*gender733591.265333649.8839
6carSafety*income833590.2351*33655.3629
7income*gender933591.803933663.4401
* Optimal Value Of Criterion

Selection stopped because all effects are in the model.

The model at step 6 is selected.

Selected Effects:Intercept carType gender carType*gender carSafety income education carSafety*income


The selection summary for the Weibull distribution is shown in Output 26.7.11. It indicates that the selection stopped at the local minimum of the AICC statistic at step 5 because of the shorter stop horizon.

Output 26.7.11: Forward Selection Summary for the Weibull Distribution

The SEVSELECT Procedure
 
Weibull Distribution
Selection Details

Selection Summary
StepEffect
Entered
Number
Effects In
AICC SBC
0Intercept1  
 carSafety236202.428436221.9751
1carType334560.112934586.1736
2gender434200.975634233.5496
3income533935.344033974.4303
4education633857.115633909.2243*
5carType*gender733856.5340*33915.1526
6carSafety*income833857.114333922.2421
* Optimal Value Of Criterion

Selection stopped at a local minimum of the AICC criterion.

The model at step 5 is selected.

Selected Effects:Intercept carType gender carType*gender carSafety income education


As the results in Output 26.7.10 and Output 26.7.11 show, although the SELECT= criterion is reported in the "Selection Summary" table, it does not decide the final selected model. Instead, the SELECT= criterion is used to choose the best effect to add or remove in each step. To illustrate that, Output 26.7.12 shows the details of step 1 for the Weibull distribution. PROC SEVSELECT produces the step details because of the DETAILS=ALL option in the SELECTION statement. Step 1 is the step after the initial step (step 0), which fits the model with the intercept and carSafety effect that the INCLUDE= option forces in. The "Entry Candidates" table of step 1 shows the candidates that PROC SEVSELECT evaluates for entering the model. For each candidate, it shows the value of the SELECT= criterion, which is the SBC statistic, of the model that includes that candidate. The interaction effects carType*gender and carSafety*income are not present in this list of candidates, because of the constraint that the HIERARCHY=SINGLE option imposes. The model that includes the carType effect has the smallest SBC statistic, so PROC SEVSELECT selects it in step 1. The "Optimization Summary" table shows that PROC SEVSELECT uses the trust region optimization method, which is the default optimization method for fitting a model in each step. You can use the SELECTNLOTECH= option in the PROC SEVSELECT statement to specify a different optimization method to use during each step of the selection. The "Parameter Estimates" table shows that step 1’s model includes the best entry candidate, carType, and the carSafety effect, which entered the model in step 0. The estimate of the intercept effect is reflected in the estimate of the scale parameter Theta, as described in the section Reporting Estimates of Regression Parameters.

Output 26.7.12: Details of Step 1 of the Forward Selection Process for the Weibull Distribution

The SEVSELECT Procedure
 
Weibull Distribution
Forward Selection: Step 1
Effect Entered: carType

Entry Candidates
RankEffectSBC
1carType34586.1736
2gender36000.8378
3education36142.6117
4income36150.6917

Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.

Optimization Summary
Optimization TechniqueTrust Region
Iterations4
Function Calls13
Log Likelihood-17276.05243

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Theta1172.584894.9261935.03<.0001
Tau11.397190.0226661.65<.0001
carType SUV11.289930.0291944.18<.0001
carType Sedan00...
carSafety1-0.853720.04522-18.88<.0001


The fit summary of the final model for the Weibull distribution is shown in Output 26.7.13. It shows that PROC SEVSELECT uses the trust region optimization method to estimate the parameters of the final model. The "Parameter Estimates" table shows that some regression parameters are not significant at the usual 95% confidence level. None of the selection criteria that PROC SEVSELECT supports depend directly on the p-values of regression effects. So a statistically insignificant effect might be included in the final model, as this example illustrates. If you do not want such effects in the final model, you can modify the selection method settings to search for a different model that contains all statistically significant effects. Alternatively, you can use your domain knowledge to decide which effects you want to retain from the selected model and then refit the model by appropriately modifying the SCALEMODEL statement.

Output 26.7.13: Selected Scale Regression Model for the Weibull Distribution

Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.

Optimization Summary
Optimization TechniqueTrust Region
Iterations4
Function Calls12
Log Likelihood-16919.24895

Parameter Estimates
ParameterDFEstimateStandard
Error
t ValueApprox
Pr > |t|
Theta1177.533135.6337531.51<.0001
Tau11.630780.0262162.23<.0001
carType SUV11.270040.0357835.50<.0001
carType Sedan00...
gender Female10.459390.0270316.99<.0001
gender Male00...
carType SUV * gender Female10.080090.049811.610.1079
carType SUV * gender Male00...
carType Sedan * gender Female00...
carType Sedan * gender Male00...
carSafety1-0.825000.03881-21.26<.0001
income1-0.380160.02832-13.42<.0001
education AdvancedDegree1-0.326020.03563-9.15<.0001
education College1-0.042460.02748-1.550.1224
education High School00...


Last updated: July 09, 2026