The copulaViewStore action displays the model and estimates that are preserved in a specified item store. This is useful for reviewing the results of a previously fitted copula model without having to re-run the entire estimation process. The action allows you to select which parts of the stored model to display, such as model definitions, parameter estimates, and fit summaries.
| Parameter | Description |
|---|---|
| instore | Specifies the item store that contains the model and its estimates to be displayed. This is a mandatory parameter. |
| viewOptions | Specifies which reports to display from the restored item store. You can choose to display all information, a minimal summary, or specific parts like model definition, parameter estimates, and correlations. |
| display | Specifies which display tables to generate. This allows for fine-grained control over the output tables produced by the action. |
| outputTables | Specifies which of the generated display tables should be saved as CAS output tables. |
| timingReport | Specifies the level of detail for the timing report of the action's execution. |
Before using copulaViewStore, you first need to fit a copula model and save it to an item store using the 'copulaFit' action. The following code creates a sample dataset, fits a Gaussian copula model, and saves the results in an item store named 'myCopulaStore'. This store can then be used as input for copulaViewStore.
| 1 | /* Create a sample dataset */ |
| 2 | DATA mycas.sample_data; |
| 3 | DO i = 1 to 100; |
| 4 | u1 = rand('UNIFORM'); |
| 5 | u2 = rand('UNIFORM'); |
| 6 | OUTPUT; |
| 7 | END; |
| 8 | RUN; |
| 9 | |
| 10 | /* Fit a Gaussian copula and save to an item store */ |
| 11 | PROC CAS; |
| 12 | copula.copulaFit |
| 13 | TABLE={name='sample_data'}, |
| 14 | copula='GAUSSIAN', |
| 15 | marginals={'UNIFORM', 'UNIFORM'}, |
| 16 | var={'u1', 'u2'}, |
| 17 | store={name='myCopulaStore', replace=true}; |
| 18 | RUN; |
This example demonstrates how to display the minimal summary of a copula model that has been previously saved in an item store named 'myCopulaStore'.
| 1 | |
| 2 | PROC CAS; |
| 3 | copula.copulaViewStore / instore={name='myCopulaStore'} viewOptions={minimal=true}; |
| 4 | |
| 5 | RUN; |
| 6 |
This example shows how to retrieve and display all available information from a stored copula model, including the model definition, initial and final parameter estimates, correlations, and optimizer settings.
| 1 | |
| 2 | PROC CAS; |
| 3 | copula.copulaViewStore / instore={name='myCopulaStore'} viewOptions={all=true}; |
| 4 | |
| 5 | RUN; |
| 6 |
This example demonstrates how to view only the final parameter estimates and the correlation matrix from the item store, and then save these specific tables as CAS output tables for further analysis.
| 1 | |
| 2 | PROC CAS; |
| 3 | copula.copulaViewStore / instore={name='myCopulaStore'} viewOptions={finalEstimates=true, correlations=true} outputTables={names={'FinalEstimates', 'Correlations'}}; |
| 4 | |
| 5 | RUN; |
| 6 |
A financial institution is modeling the dependency between two credit portfolios (Portfolio A and Portfolio B) using a t-Copula to assess systemic risk. Before deploying the mod...
A global logistics company has fitted a complex dependency model between 'Shipping Delay' and 'Fuel Cost' across varying routes. The Data Engineering team needs to export the co...
A regulatory audit is required on a credit scoring model. Strict privacy laws mandate that the original training data be deleted immediately after training. The auditor must ver...