countreg countregViewStore

High-Volume Retail Traffic Model Inspection

Scénario de test & Cas d'usage

Business Context

A large retail chain uses a Negative Binomial model to predict daily footfall traffic across thousands of stores based on marketing promotions. The Data Science team needs to verify that the stored model contains all necessary optimization history and correlation data before deploying it to production. The test focuses on the action's ability to retrieve 'all' details efficiently from a store associated with a larger dataset.
Data Preparation

Generating a larger dataset simulating daily traffic for multiple stores with promotion flags.

Copied!
1 
2DATA casuser.store_traffic;
3call streaminit(999);
4DO i=1 to 5000;
5promo_active = rand('Bernoulli', 0.2);
6holiday = rand('Bernoulli', 0.05);
7traffic = rand('NegBinomial', 0.5, 10);
8OUTPUT;
9END;
10 
11RUN;
12 

Étapes de réalisation

1
Fit a Negative Binomial model to handle overdispersion in traffic data and save it to 'traffic_model_store'.
Copied!
1 
2PROC CAS;
3countreg.countregFitModel / TABLE='store_traffic', model={depVars={{name='traffic'}}, effects={{vars={'promo_active', 'holiday'}}}}, dist='NEGBIN', store={name='traffic_model_store', replace=true};
4 
5RUN;
6 
2
Retrieve and display ALL available model details (Optimization settings, correlations, fit summary, etc.) to validate model completeness.
Copied!
1 
2PROC CAS;
3countreg.countregViewStore / TABLE='store_traffic', instore='traffic_model_store', viewOptions={all=true};
4 
5RUN;
6 

Expected Result


The action must return a comprehensive list of tables, including Optimizer Settings, Iteration History (if applicable from fit), Correlations, and Fit Statistics. The execution should complete without error, demonstrating the action can handle full detailed retrieval.