The CCDM Procedure

OUTSUM Statement

  • OUTSUM OUT=CAS-libref.data-table statistic-keyword<=variable-name> <…statistic-keyword<=variable-name>> <outsum-options>;

The OUTSUM statement enables you to specify the data table in which PROC CCDM writes the summary statistics of the compound distribution samples.

If you specify more than one OUTSUM statement, only the first one is used.

You must specify the output data table by using the following option:

OUT=CAS-libref.data-table
OUTSUM=CAS-libref.data-table

specifies the output data table that contains the summary statistics of each of the simulated compound distribution samples. CAS-libref.data-table is a two-level name, where CAS-libref refers to the caslib and session identifier, and data-table specifies the name of the output data table. For more information about this two-level name, see the DATA= option and the section Using CAS Sessions and CAS Engine Librefs. The CAS-libref must be identical to the CAS-libref that you specify in the DATA= option.

You can control the summary statistics that appear in this data table by specifying different statistic-keywords and outsum-options.

You can request that one or more predefined statistics of the compound distribution sample be written to the OUTSUM= data table. For each specification of the form statistic-keyword<=variable-name>, the statistic that is specified by the statistic-keyword is written to a variable named variable-name. If you do not specify the variable-name, then the statistic is written to a variable named statistic-keyword. You can specify the following statistic-keywords:

KURTOSIS
KURT

specifies the kurtosis of the compound distribution sample.

MEAN

specifies the mean of the compound distribution sample.

P01

specifies the 1st percentile of the compound distribution sample.

P05

specifies the 5th percentile of the compound distribution sample.

P10

specifies the 10th percentile of the compound distribution sample.

P25
Q1

specifies the lower or 1st quartile (the 25th percentile) of the compound distribution sample.

P50
MEDIAN
Q2

specifies the median (the 50th percentile) of the compound distribution sample.

P75
Q3

specifies the upper or 3rd quartile (the 75th percentile) of the compound distribution sample.

P90

specifies the 90th percentile of the compound distribution sample.

P95

specifies the 95th percentile of the compound distribution sample.

P99

specifies the 99th percentile of the compound distribution sample.

P99_5
P995

specifies the 99.5th percentile of the compound distribution sample.

QRANGE

specifies the interquartile range (Q3–Q1) of the compound distribution sample.

SKEWNESS
SKEW

specifies the skewness of the compound distribution sample.

STDDEV
STD

specifies the standard deviation of the compound distribution sample.

All percentiles are computed by using the method that you specify in the PCTLDEF= option in the PROC CCDM statement. You can also request additional percentiles to be reported in the OUTSUM= data table by specifying the following outsum-options:

PCTLPTS=percentile-list

specifies one or more percentiles that you want to be computed and written to the OUTSUM= data table. This option is useful if you need to request percentiles that are not available in the preceding list of statistic-keyword values. Each percentile value must belong to the (0,100) open interval. The percentile-list is a comma-separated list of numbers. You can also use a list notation of the form "<number1> to <number2> by <increment>". For example, the following two options are equivalent:

pctlpts=10, 20, 99.6, 99.7, 99.8, 99.9
pctlpts=10, 20, 99.6 to 99.9 by 0.1

You can specify the name of the variable for a particular percentile value in the PCTLNAME= option.

PCTLNAME=percentile-variable-name-list

specifies the names of the variables that contain the estimates of the percentiles that you request by using the PCTLPTS= option.

If you specify the PCTLNAME= option, you must specify it as the last option in the OUTSUM statement.

If you do not specify the PCTLNAME= option, then each percentile value t in the list of values in the PCTLPTS= option is written to the variable named "Pt," where the decimal point in t, if any, is replaced by an underscore.

The percentile-variable-name-list is a space-separated list of names. You can also use a shortcut notation of <prefix>m–<prefix>n for two integers m and n (m less-than n) to generate the following list of names: <prefix>m, <prefix>m plus 1, …, and <prefix>n. For example, the following two options are equivalent:

pctlname=p1 p2 pc5 pc6 pc7 pc8 pc9 pc10
pctlname=p1 p2 pc5-pc10

The name in jth position of the expanded name list of the PCTLNAME= option is used to create a variable for a percentile value in the jth position of the expanded value list of the PCTLPTS= option. If you specify k Subscript n names in the PCTLNAME= option and k Subscript v percentile values in the PCTLPTS= option, and if k Subscript n Baseline less-than k Subscript v, then the first k Subscript n percentiles are written to the variables that you specify. The remaining k Subscript v Baseline minus k Subscript n percentiles are written to the variables that have the name of the form Pt, where t is the text representation of the percentile value that is formed by retaining at most PCTLNDEC= digits after the decimal point and replacing the decimal point with an underscore ('_'). For example, assume that you specify the following options:

pctlpts=10, 20, 99.3 to 99.5 by 0.1, 99.995
pctlname=pten ptwenty ninenine3-ninenine5

Then PROC CCDM writes the 10th and 20th percentiles to the variables pten and ptwenty, respectively; the 99.3rd through 99.5th percentiles to the variables ninenine3, ninenine4, and ninenine5, respectively; and the remaining 99.995th percentile to the variable P99_995.

If a percentile value in the PCTLPTS= option matches a percentile value that is implied by one of the predefined percentile statistics and you specify the corresponding statistic-keyword, then the variable name that is implied by the statistic-keyword<=variable-name> specification takes precedence over the name that you specify in the PCTLNAME= option. For example, assume that you specify the predefined percentile statistic of P95, as in the following OUTSUM statement:

outsum out=mypctls p95=ninetyfifth
        pctlpts=95 to 99 by 1 pctlname=pct95-pct99;

Then the 95th percentile is written to the variable ninetyfifth instead of the variable pct95 that the PCTLNAME= option implies.

PCTLNDEC=integer-value

specifies the maximum number of decimal places to use while creating the names of the variables for the percentile values in the PCTLPTS= option. By default, PCTLNDEC=3. For example, for a percentile value of 99.9995, PROC CCDM creates a variable named P99_999 by default, but if you specify PCTLNDEC=4, then the variable is named P99_9995.

The PCTLNDEC= option is used only for percentile values for which you do not specify a name in the PCTLNAME= option.

Note that all variable names in the OUTSUM= data table have a limit of 32 characters. If a name exceeds that limit, then it is truncated to the first 32 characters. For more information about the variables in the OUTSUM= data table, see the section OUTSUM= Data Table.

Last updated: January 27, 2023