The cdm action simulates a compound distribution model, which is a common approach for modeling the aggregate losses or the total amount of losses that occur over a certain period. This action is part of the Aggregate Loss Modeling action set. It can handle various types of models, including collective risk, pure premium, and custom models, allowing for flexible and detailed analysis of loss distributions.
| Parameter | Description |
|---|---|
| adjustedSeverity | Specifies the adjusted severity symbols and a SAS program to compute them. An aggregate distribution is estimated for each adjusted severity symbol. |
| aggLossModelType | Specifies the type of model to use for the aggregate loss. Options are COLLECTIVERISK, CUSTOM, or PUREPREMIUM. |
| countDistributions | Specifies count distributions and their parameter values directly. |
| countStore | Specifies an item-store table to read count model estimates from, created by the countregFitModel action. |
| countVariable | Specifies the count variable when using an input data table for simulation. |
| display | Specifies a list of results tables to be displayed. |
| idVariable | Specifies the name of the replication ID variable. |
| ignoreParmCovariance | If true, ignores the covariance estimates of parameters and uses only their standard errors for perturbation. |
| maxCountDraw | Specifies an upper limit on the number of loss events for simulating one aggregate loss sample point. |
| nPerturbedSamples | Specifies the number of perturbed samples for parameter perturbation analysis. |
| nReplicates | Controls the size of the compound distribution sample to be simulated. |
| outDraw | Specifies the output table to write severity draws to. |
| output | Specifies the output table for the final aggregate loss samples. |
| outputTables | Lists the names of results tables to save as CAS tables on the server. |
| outsum | Specifies the output table for summary statistics of the aggregate loss sample. |
| percentileMethod | Specifies the method for computing percentiles of the compound distribution (0-5). |
| perturbMode | Specifies how to organize perturbed samples across worker nodes (AUTO or DIST). |
| plotTable | Controls the creation and content of the PlotData results table for generating plots. |
| seed | Specifies the seed for the random number generator. A value of 0 selects a random seed. |
| severityDefinitions | Specifies the CAS table that contains the severity distribution definitions. |
| severityDistributions | Specifies the list of severity distribution names to analyze. |
| severityEst | Specifies a table to read severity model estimates from, created by the severity action. |
| severityStore | Specifies an item-store table to read severity model estimates from, created by the severity action. |
| severityTruncationLeft | Specifies the left truncation threshold to apply to each severity value. |
| severityTruncationRight | Specifies the right truncation limit to apply to each severity value. |
| simulatedSymbols | Specifies external, user-defined random variables (symbols) and their probability distributions to be used in custom simulations. |
| table | Specifies the input data table for simulation. |
| truncateZeros | If true, removes zero-valued aggregate losses from the final sample. |
| varianceDivisor | Specifies the divisor (DF for N-1, N for N) to use in calculating variance and related statistics. |
The cdm action requires pre-existing CAS tables for severity and count model definitions or estimates. The following code shows how to create a simple severity definition table `mycas.sevdeff` which defines two severity distributions, Log-Normal (Logn) and Burr.
| 1 | DATA mycas.sevdeff; |
| 2 | LENGTH model $ 8; |
| 3 | INFILE DATALINES truncover; |
| 4 | INPUT model$ @@; |
| 5 | IF (model = 'Logn') THEN DO; |
| 6 | dist='LOGN'; |
| 7 | INPUT mu sigma; |
| 8 | END; |
| 9 | ELSE IF (model = 'Burr') THEN DO; |
| 10 | dist='BURR'; |
| 11 | INPUT alpha theta; |
| 12 | END; |
| 13 | DATALINES; |
| 14 | Logn 3 0.5 |
| 15 | Burr 2 1500 |
| 16 | ; |
| 17 | RUN; |
This example simulates an aggregate loss sample using a predefined Poisson distribution for frequency (count) and a Log-Normal distribution for severity. It's a self-contained example that doesn't require prior model fitting.
| 1 | PROC CAS; |
| 2 | cdm.cdm / |
| 3 | nReplicates=10000, |
| 4 | seed=1234, |
| 5 | countDistributions={{name='POISSON', parmValues={{value=2}}}}, |
| 6 | severityDefinitions={name='mycas.sevdeff', where='model="Logn"'}, |
| 7 | OUTPUT={outSample={name='mycas.aggloss', replace=true}, sampleVariable='AggLoss'}, |
| 8 | outsum={outSummary={name='mycas.aggloss_summary', replace=true}}; |
| 9 | RUN; |
| 10 | QUIT; |
This example demonstrates a more advanced scenario where both count and severity models are specified via pre-estimated item stores (`mycas.cntest` and `mycas.sevest`). It performs a parameter perturbation analysis by generating 50 perturbed samples (`nPerturbedSamples=50`) to assess the impact of parameter uncertainty on the aggregate loss distribution.
| 1 | PROC CAS; |
| 2 | cdm.cdm / |
| 3 | nReplicates=10000, |
| 4 | seed=1234, |
| 5 | countStore={name='mycas.cntest'}, |
| 6 | severityStore={name='mycas.sevest'}, |
| 7 | nPerturbedSamples=50, |
| 8 | OUTPUT={outSample={name='mycas.aggloss_pert', replace=true}, perturbOut=true}, |
| 9 | outsum={outSummary={name='mycas.aggloss_pert_summary', replace=true}}; |
| 10 | RUN; |
| 11 | QUIT; |
An insurance company wants to estimate the total payout for its auto insurance portfolio for the upcoming year. They model the frequency of claims using a Poisson distribution a...
A banking institution needs to perform a stress test on its operational risk models. They require a high volume of simulations (100,000 replicates) to ensure tail accuracy and w...
An actuary needs to project future liabilities where the claim amounts are expected to grow due to economic inflation. Instead of changing the base model parameters, they want t...