SAS small project
Budget: $10 – $30 CAD
Task 1 - 10 marks) Use retail segmentation data. Build value segmentation with profiling.
Use customers.csv & transactions.csv
Step 1) Calculate 33 & 66 percentile cutoff for total spend & total visits.
Hints - proc univariate data = dataset_name;
var column_name;
output out = output_dataset_name p33 p66 pctlpre=P;
run;
Step 2) Store the percentile cutoffs in macro variables . P33_spend, p66_spend, p33_visit, p66_visit
Step 3) Give Score basis spend & visits
Hint -
If spend > p66_spend then score = 3
If spend < p33_spend then score = 1
else score = 2
Do the same for visits
Step 4) Calculate total score by adding spend & visit scores
Step 5) Create the final segment -
Segment = Champion if score =6
Segment = Losers if score <= 3
Segment = Potential for all other scores
Step 6) Perform the profiling basis numeric variables, by taking the avg of these variables - Total_spend, Total_visit, Instore_spend, Instore_visit, online_spend, Online_visit. Also show Count of each segment.
Step 7) Write a macro program to perform profiling of value segments across the following variables - loyalty, preferred_store_format, lifestyle, gender
The macro should take as input one column name (from the list given above) . It should then generate the cross tab for value segment vs the column name.
Task 2 - 5 Marks) Use the startup company data.
Write a macro program that takes as input 3 values. These values represent cut off for 2015 revenue, 2015 profit & 2015 growth
The program then should the list of company names with 2015 revenue, 2015 profit & 2015 growth more then the respective cutoffs given
Use customers.csv & transactions.csv
Step 1) Calculate 33 & 66 percentile cutoff for total spend & total visits.
Hints - proc univariate data = dataset_name;
var column_name;
output out = output_dataset_name p33 p66 pctlpre=P;
run;
Step 2) Store the percentile cutoffs in macro variables . P33_spend, p66_spend, p33_visit, p66_visit
Step 3) Give Score basis spend & visits
Hint -
If spend > p66_spend then score = 3
If spend < p33_spend then score = 1
else score = 2
Do the same for visits
Step 4) Calculate total score by adding spend & visit scores
Step 5) Create the final segment -
Segment = Champion if score =6
Segment = Losers if score <= 3
Segment = Potential for all other scores
Step 6) Perform the profiling basis numeric variables, by taking the avg of these variables - Total_spend, Total_visit, Instore_spend, Instore_visit, online_spend, Online_visit. Also show Count of each segment.
Step 7) Write a macro program to perform profiling of value segments across the following variables - loyalty, preferred_store_format, lifestyle, gender
The macro should take as input one column name (from the list given above) . It should then generate the cross tab for value segment vs the column name.
Task 2 - 5 Marks) Use the startup company data.
Write a macro program that takes as input 3 values. These values represent cut off for 2015 revenue, 2015 profit & 2015 growth
The program then should the list of company names with 2015 revenue, 2015 profit & 2015 growth more then the respective cutoffs given