Book Image

SAS for Finance

By : Harish Gulati
Book Image

SAS for Finance

By: Harish Gulati

Overview of this book

SAS is a groundbreaking tool for advanced predictive and statistical analytics used by top banks and financial corporations to establish insights from their financial data. SAS for Finance offers you the opportunity to leverage the power of SAS analytics in redefining your data. Packed with real-world examples from leading financial institutions, the author discusses statistical models using time series data to resolve business issues. This book shows you how to exploit the capabilities of this high-powered package to create clean, accurate financial models. You can easily assess the pros and cons of models to suit your unique business needs. By the end of this book, you will be able to leverage the true power of SAS to design and develop accurate analytical models to gain deeper insights into your financial data.
Table of Contents (9 chapters)

Analysis of a set size of two

To keep matters simple, let's try and study the affinity between two products/services. This can also be phrased as having a set size of two. The data that we have has customers with up to eight products/services in their baskets. Hence, we could have up to a set size of eight. Currently, the data we have resembles a wide state, as represented in Figure 7.3. We will transpose this data, find the count of various products/services, and create some macro variables to store information. The macro variables will primarily hold the count of products and services, and the total number of customers, and a couple of others will aid us in executing the macro.

Here is the data transformation and macro variable initiation:

Proc transpose data=wide out=long (rename=(col1=PRODUCTS) drop=_label_); 
By custid; 
Var pr1-pr8; 
run; 
 
proc sql;  
   create table...