copula

copulaViewStore

Description

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.

copula.copulaViewStore <result=results> <status=rc> / instore={table-spec} <, viewOptions={viewOpts}> <, display={displayTables}> <, outputTables={outputTables}> <, timingReport={timingReportOpts}>;
Settings
ParameterDescription
instoreSpecifies the item store that contains the model and its estimates to be displayed. This is a mandatory parameter.
viewOptionsSpecifies 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.
displaySpecifies which display tables to generate. This allows for fine-grained control over the output tables produced by the action.
outputTablesSpecifies which of the generated display tables should be saved as CAS output tables.
timingReportSpecifies the level of detail for the timing report of the action's execution.
Data Preparation View data prep sheet
Data Creation for Model Fitting

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.

Copied!
1/* Create a sample dataset */
2DATA mycas.sample_data;
3 DO i = 1 to 100;
4 u1 = rand('UNIFORM');
5 u2 = rand('UNIFORM');
6 OUTPUT;
7 END;
8RUN;
9 
10/* Fit a Gaussian copula and save to an item store */
11PROC 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};
18RUN;

Examples

This example demonstrates how to display the minimal summary of a copula model that has been previously saved in an item store named 'myCopulaStore'.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3copula.copulaViewStore / instore={name='myCopulaStore'} viewOptions={minimal=true};
4 
5RUN;
6 
Result :
The action will display a minimal set of tables, typically including the model definition and a summary of the fit, providing a quick overview of the stored model.

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.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3copula.copulaViewStore / instore={name='myCopulaStore'} viewOptions={all=true};
4 
5RUN;
6 
Result :
A comprehensive set of output tables will be displayed, including 'ModelDefinition', 'InitialEstimates', 'FinalEstimates', 'Correlations', and 'OptimizerSettings', offering a complete view of the fitted model.

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.

SAS® / CAS Code Code awaiting community validation
Copied!
1 
2PROC CAS;
3copula.copulaViewStore / instore={name='myCopulaStore'} viewOptions={finalEstimates=true, correlations=true} outputTables={names={'FinalEstimates', 'Correlations'}};
4 
5RUN;
6 
Result :
The action will display the 'FinalEstimates' and 'Correlations' tables. Additionally, two new CAS tables named 'FinalEstimates' and 'Correlations' will be created in the active caslib, containing the respective results.

FAQ

What is the primary function of the copulaViewStore action?
Which parameter is required to specify the item store to view?
How can I control the specific tables and reports that are displayed from the item store?
Is it possible to output the displayed reports to CAS tables?
What is the purpose of the 'display' parameter?

Associated Scenarios

Use Case
Joint Default Probability Model Review

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...

Use Case
Full Model Definition Extraction for Logistics

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...

Use Case
Blind Audit: Minimal View of Isolated Store

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...