SEVSELECT Procedure

Example 26.8 Estimating Parameters Using the Cramér–von Mises Estimator

The SEVSELECT procedure enables you to estimate model parameters by minimizing your own objective function. This example illustrates how you can use PROC SEVSELECT to implement the Cramér–von Mises estimator. Let upper F left-parenthesis y Subscript i Baseline semicolon normal upper Theta right-parenthesis denote the estimate of CDF at y Subscript i for a distribution with parameters normal upper Theta, and let upper F Subscript n Baseline left-parenthesis y Subscript i Baseline right-parenthesis denote the empirical estimate of CDF (EDF) at y Subscript i that is computed from a sample y Subscript i, 1 less-than-or-equal-to i less-than-or-equal-to upper N. Then, the Cramér–von Mises estimator of the parameters is defined as

ModifyingAbove normal upper Theta With caret equals arg min Underscript normal upper Theta Endscripts sigma-summation Underscript i equals 1 Overscript upper N Endscripts left-parenthesis upper F left-parenthesis y Subscript i Baseline semicolon normal upper Theta right-parenthesis minus upper F Subscript n Baseline left-parenthesis y Subscript i Baseline right-parenthesis right-parenthesis squared

This estimator belongs to the class of minimum distance estimators. It attempts to estimate the parameters such that the squared distance between the CDF and EDF estimates is minimized.

The following PROC SEVSELECT step uses the Cramér–von Mises estimator to fit four candidate distribution models, including the LOGNGPD mixed-tail distribution model that is defined in Defining a Model for Mixed-Tail Distributions. The input sample is the same one that is used in that example.

/*--- Set the search path for functions defined with PROC FCMP ---*/
options cmplib=(work.sevexmpl);

/*-------- Fit LOGNGPD model with PROC SEVSELECT by using -------
  -------- the Cramer-von Mises minimum distance estimator -------*/
proc sevselect data=mylib.testmixdist objective=cvmobj print=all;
   loss y;
   dist logngpd burr logn gpd;

   * Cramer-von Mises estimator (minimizes the distance *
   * between parametric and nonparametric estimates)    *;
   cvmobj = (_cdf_(y) -_edf_(y))**2;
run;

The OBJECTIVE= option in the PROC SEVSELECT statement specifies that the objective function cvmobj should be minimized. The programming statements compute the contribution of each observation in the input data table to the objective function cvmobj. The use of the keyword functions _CDF_ and _EDF_ makes the program applicable to all the distributions. When PROC SEVSELECT runs on a CAS server that has more than one worker node, each worker node evaluates the _EDF_ function by using a local sample of the input data.

Some of the key results that PROC SEVSELECT produces are shown in Output 26.8.1. The "Model Selection" table indicates that all models converged. When you specify a custom objective function, the default selection criterion is the value of the custom objective function. The "All Fit Statistics" table indicates that LOGNGPD is the best distribution according to all the statistics of fit. Comparing the fit statistics of Output 26.8.1 with those of Output 26.2.1 indicates that the use of the Cramér–von Mises estimator has resulted in smaller values for all the EDF-based statistics of fit for all the models, which is expected from a minimum distance estimator.

Output 26.8.1: Summary of Cramér–von Mises Estimation

The SEVSELECT Procedure

Model Selection
DistributionConvergedcvmobjSelected
LogngpdYes0.12846Yes
BurrYes0.22681No
LognYes0.16928No
GpdYes35.98574No

All Fit Statistics
Distributioncvmobj-2 Log
Likelihood
AICAICCSBCKSADCvM
Logngpd0.12846*3657*3667*3667*3691*0.86572*1.04025*0.12957*
Burr0.2268137243730373037441.016602.270600.22826
Logn0.1692839083912391239220.929262.011920.16956
Gpd35.9857454015405540554159.85292188.9329935.99968
Asterisk (*) denotes the best model in the column.


Last updated: July 09, 2026