SlideShare a Scribd company logo
Online Grocery Store Segmentation
Eric Xiong, Elaine Su, Tianhong Chu, Dannie Hu, Biying Pan
Methodology
1.
a. Identify Key Variables
b. Develop Key Behavior Dimensions
c. Segment & Profile Customers
d. Recommendations
Key Variables for Analysis
Demographics
We did not use demographic
variables (most of them are
categorical variables) for our factor
analysis since we read that there
may be issues related to using
categorical variables in factor
analysis
Order Behavior
● Tenure
● Recency
● Frequency
● Average spending per order
● Percentage of purchases with
incentives
Order Category
Spending Percentage of :
● Drinks & Snacks
● Fresh Food
● Cooking Ingredients
● House & Family Care
● Health & Beauty
● Indulgence
● Dairy
● Other
Key Behavioral Dimensions
1. Long-Term Frequent High Spenders
2. Home & Health Shoppers
3. Convenience/Fast Cookers
4. Snack Lovers
5. Inactive Incentive Seekers
Segments Overview
Our Best Customers
Segments Overview
Key Take Aways:
Loyal Chris and home-loving Jenna are our top two customers in terms of frequency and average spending per order.
Segment Profiles
Loyal Chris Home-loving Jenna
● Married, MBA Graduate
● Medill professor, Data Scientist
● Best customer: purchase most
frequently, spends the most
money per order and has been
a customer for the longest time
● No strong preference of any
specific product category
● Married, 2 kids, IMC Master
Graduate
● Part-time housewife, proud
mom
● Purchases the most House &
Family Care products for her
family and Health & Beauty
products to take care of herself
● Single, College Dropout
● Full-time Uber Driver
● Loves video game and comics
● Too lazy to cook so he
purchases a lot of convenient
frozen and pre-made food but
very few fresh food
Lazy Andrew
Segment Profiles
One-time SeanFrugal Omar Snacker RushilFresh Alex
● Married, 4 kids
● Saves money to raise family
● Most inactive, purchases least
frequently
● Very price sensitive: a lot
more likely to buy products
at our store when there’s an
incentive or discount.
● Married, 2 kids
● Spends the least amount per
order
● Loves eating snacks and
purchases a lot of snacks for
his kids and himself
● Busy with work, rarely cooks
anything himself at home
● Married, College Graduate
● Crossfit Enthusiast
● Health-conscious: cares
about the quality of food
● Purchases the most fresh
food and tries to avoid
snacks and frozen and
pre-made food
● Only purchased at our store
once and it is most likely
because there was a special
offer or coupon given to
him
● Spends the least amount on
his orders
High Profit
Long Term
Customers
Accounts for 17.7% of the total customers
Highest average spending level (1.2 times compared to overall average)
3 times more frequent to shop at our store than overall frequency
Has been shopping with us for an average of over 7 years
Upper-Class
Customers
Has the highest education levels
Are more likely to be married and have kids
Has the highest income and lives in single unit houses
Target Audience: The Loyalists
Recommendation: Loyal Chris
● Create a loyalty program to reward customers: e.g. earn points for every qualifying
purchase and get rewards
● Provide a special level of services: e.g. personal customer representatives, faster
shipping options, free gifts on special occasions.
● Reward introductions and referrals: offer rewards in return for introducing new
customers to place orders, because Loyal Chris can provide better word of mouth, and
may thus more easily introduce similar upper-level customers.
RETAIN+ACQUIRE
High Profit
Frequent
Customers
Accounts for 15.2% of the total customers
Second highest average spending (1.07 times compared to overall average)
Second highest frequency level
Home
Caring
Lovers
Second highest percentage of high education and marriage status
High income customers
Interested in purchasing non-grocery items that are related to home, family,
beauty and health
Target Audience: The Home-Lovers
Recommendation:Home-loving Jenna
● Online automatic subscription: Household, beauty and health products with a steady
consumption rate are well suited to online purchasing. Easier for time-crunched consumers
to get the items they need.
● Influencers and social media: Partnering with bloggers to increase product awareness
and creating promotion in the social media.
● Pairing like products: Pairing complementary products with a promotional price on the
set will capitalize customers’ perceived value.
GROWTH
Thank you!
What questions do you have?
Appendix
Final Factor Result
Final Segments Profile
One-time Customers
Final Code
libname imcdata '/projects/e30509/imc486';
proc datasets lib=imcdata; quit; run;
* data read-in;
data ordprod;
set imcdata.ordprod; run;
proc print data=ordprod(obs=20); run;
data lookup;
set imcdata.lookup; run;
proc print data=lookup(obs=20); run;
*categorize minor_cat into 8 major categories;
data lookup1;
set lookup;
if index(minor_cat, "JUICE") +
index(minor_cat, "BEVERAGES") + index(minor_cat,"SNACKS") then major_cat="Drinks & Snacks";
else if index(minor_cat, "FROZEN") + index(minor_cat, "PACK") + index(minor_cat, "REFRIG") +
index(minor_cat, "CANNED")
+ index(minor_cat, "INSTANT") + index(minor_cat, "BOXED") > 0 then major_cat = "ConvenienceFood";
else if index(minor_cat, "FRESH") > 0 then major_cat = "Fresh Food";
else if index(minor_cat, "DAIRY") > 0 then major_cat = "Dairy";
else if index(minor_cat, "GROC") > 0 then major_cat = "Cooking Ingredients";
else if index(minor_cat, "HB") > 0 then major_cat = "Health & Beauty";
else if index(minor_cat, "HH") + index(minor_cat, "HG") +
index(minor_cat,"BABY") + index(minor_cat, "PET") > 0 then major_cat = "Home & Family Care" ;
else if index(minor_cat, "ALCOHOL") + index(minor_cat, "CIGARETTES") + index(minor_cat,
"CIGARS/CHEWING") > 0 then major_cat = "Indulgence";
else major_cat = "Other";
run;
proc freq data=lookup1;
table major_cat; run;
* join minor_cat to ordprod table;
proc sql;
create table ordprod_cat as
select ord_id, spec_cd, it_qy, it_pr_qy, tot_pr_qy, major_cat
from ordprod as o left join lookup1 as l
on o.pod_id = l.pod_id;
quit;
proc freq data=ordprod_cat;
table major_cat; run;
* join cnsm_id to ordprod table;
data order;
set imcdata.order;
if cnsm_id = "" then delete;
if it_dmnd_qy = . then delete;
if ord_seq_num = . then delete;
if sale_inct_qy = . then sale_inct_qy = 0;
run;
proc sql;
create table ordprod_cat1 as
select cnsm_id, spec_cd, it_qy, it_pr_qy, tot_pr_qy, major_cat
from ordprod_cat as o inner join order as i
on o.ord_id = i.ord_id;
quit;
* roll - up ordprod to customer level;
proc sort data = ordprod_cat1 out = ordprod_cat_s;
by cnsm_id; run;
data ordprod_cat_cust;
set ordprod_cat_s;
by cnsm_id;
retain spec_cd_qty tot_qty spending_tot
qty_ds qty_con qty_fresh
qty_dairy qty_cooking qty_hb
qty_hf qty_indul qty_other
spending_ds spending_con spending_fresh
spending_dairy spending_cooking spending_hb
spending_hf spending_indul spending_other;
if first.cnsm_id then do;
tot_qty = 0;
spec_cd_qty = 0;
spending_tot = 0;
qty_ds = 0;
qty_con = 0;
qty_fresh = 0;
qty_dairy = 0;
qty_cooking = 0;
qty_hb = 0;
qty_hf = 0;
qty_indul = 0;
qty_other = 0;
spending_ds = 0;
spending_con = 0;
spending_fresh = 0;
spending_dairy = 0;
spending_cooking = 0;
spending_hb = 0;
spending_hf = 0;
spending_indul = 0;
spending_other = 0;
end;
tot_qty = tot_qty + it_qy;
spending_tot = spending_tot + tot_pr_qy;
if spec_cd = "*" then do;
spec_cd_qty = spec_cd_qty + it_qy;
end;
if major_cat = "Drinks & Snacks" then do;
qty_ds = qty_ds + it_qy;
spending_ds = spending_ds + tot_pr_qy;
end;
else if major_cat = "ConvenienceFood" then do;
qty_con = qty_con + it_qy;
spending_con = spending_con + tot_pr_qy;
end;
else if major_cat = "Fresh Food" then do;
qty_fresh = qty_fresh + it_qy;
spending_fresh = spending_fresh + tot_pr_qy;
end;
else if major_cat = "Dairy" then do;
qty_dairy = qty_dairy + it_qy;
spending_dairy = spending_dairy + tot_pr_qy;
end;
else if major_cat ="Cooking Ingredients" then do;
qty_cooking = qty_cooking + it_qy;
spending_cooking = spending_cooking + tot_pr_qy;
end;
else if major_cat = "Home & Family Care" then do;
qty_hf= qty_hf + it_qy;
spending_hf = spending_hf + tot_pr_qy;
end;
else if major_cat = "Health & Beauty" then do;
qty_hb = qty_hb + it_qy;
spending_hb = spending_hb + tot_pr_qy;
end;
else if major_cat = "Indulgence" then do;
qty_indul = qty_indul + it_qy;
spending_indul = spending_indul + tot_pr_qy;
end;
else if major_cat = "Other" then do;
qty_other = qty_other + it_qy;
spending_other = spending_other + tot_pr_qy;
end;
if last.cnsm_id then do;
if spending_tot = 0 then delete;
if tot_qty = 0 then delete;
qty_ds_pct = qty_ds/tot_qty;
qty_con_pct = qty_con/tot_qty;
qty_fresh_pct = qty_fresh/tot_qty;
qty_dairy_pct = qty_dairy/tot_qty;
qty_cooking_pct = qty_cooking/tot_qty;
qty_hf_pct = qty_hf/tot_qty;
qty_hb_pct = qty_hb/tot_qty;
qty_indul_pct = qty_indul/tot_qty;
qty_other_pct = qty_other/tot_qty;
spending_ds_pct = spending_ds/spending_tot;
spending_con_pct = spending_con/spending_tot;
spending_fresh_pct = spending_fresh/spending_tot;
spending_dairy_pct = spending_dairy/spending_tot;
spending_cooking_pct = spending_cooking/spending_tot;
spending_hf_pct = spending_hf/spending_tot;
spending_hb_pct = spending_hb/spending_tot;
spending_indul_pct = spending_indul/spending_tot;
spending_other_pct = spending_other/spending_tot;
spec_cd_pct = spec_cd_qty/tot_qty;
output; end;
keep it_qy cnsm_id
spec_cd_pct
qty_ds_pct
qty_con_pct
qty_fresh_pct
qty_dairy_pct
qty_cooking_pct
qty_hf_pct
qty_hb_pct
qty_indul_pct
qty_other_pct
spending_ds_pct
spending_con_pct
spending_fresh_pct
spending_dairy_pct
spending_cooking_pct
spending_hf_pct
spending_hb_pct
spending_indul_pct
spending_other_pct
spending_tot tot_qty;
run;
* order data - roll up to customer level;
proc sort data = order out = order_s;
by cnsm_id; run;
*maximum date in the table;
proc means data=order_s;
var dlv_dt; run;
data order_cust;
set order_s;
by cnsm_id;
retain frstdt lastdt freq tot_spending tot_incentive incentive_freq;
if first.cnsm_id then do;
frstdt = '31DEC2099'd;
lastdt = '31DEC1850'd;
freq = 0;
tot_spending = 0;
tot_incentive = 0;
incentive_freq = 0;
end;
tot_spending = tot_spending + it_dmnd_qy;
tot_incentive = tot_incentive + sale_inct_qy;
if dlv_dt lt frstdt then frstdt = dlv_dt;
if dlv_dt gt lastdt then lastdt = dlv_dt;
if ord_seq_num gt freq then freq = ord_seq_num;
if sale_inct_qy < 0 then incentive_freq = incentive_freq + 1;
if last.cnsm_id then do;
tenure = (19534 - frstdt)/365.25;
recency = (19534 - lastdt)/365.25;
avg_spending = tot_spending/freq;
tot_incentive_pct = tot_incentive/tot_spending;
incentive_freq_pct = incentive_freq/freq;
output;
end;
keep
cnsm_id tenure recency freq avg_spending
tot_incentive_pct incentive_freq_pct;run;
*merge order_cust with ordprod_cust;
proc sql;
create table ordprod_cust as
select o.cnsm_id, tenure, recency, freq, avg_spending,
tot_incentive_pct, incentive_freq_pct,
spec_cd_pct, qty_ds_pct, qty_con_pct,
qty_fresh_pct,qty_dairy_pct, qty_cooking_pct,
qty_hf_pct, qty_hb_pct, qty_indul_pct,
qty_other_pct, spending_ds_pct, spending_con_pct,
spending_fresh_pct, spending_dairy_pct,
spending_cooking_pct, spending_hf_pct,
spending_hb_pct, spending_indul_pct,
spending_other_pct,
spending_tot, tot_qty, it_qy
from order_cust as o inner join ordprod_cat_cust as l
on o.cnsm_id = l.cnsm_id;
quit;
*digital engagement;
proc sql;
create table sessionwithid as select cnsm_id, s.ord_id,
dvce_type, s.dlv_dt, plfm, sess_num_qy,
tot_sess_min_qy,sesstype
from imcdata.session as s inner join imcdata.order as o on
s.ord_id=o.ord_id;
proc sort data=sessionwithid;
by cnsm_id; run;
data customerlevel_session;
set sessionwithid;
by cnsm_id;
retain tot_min
tot_num
tot_pc_min
tot_tb_min
tot_sp_min
order_freq;
if first.cnsm_id then do;
tot_min=0;
tot_num=0;
tot_pc_min=0;
tot_tb_min=0;
tot_sp_min=0;
order_freq = 0;
end;
tot_min=tot_min+tot_sess_min_qy;
tot_num=tot_num+sess_num_qy;
order_freq = order_freq + 1;
if sesstype='PC' then
tot_pc_min=tot_pc_min+tot_sess_min_qy;
if sesstype='TB' then
tot_tb_min=tot_tb_min+tot_sess_min_qy;
if sesstype='SP' then
tot_sp_min=tot_sp_min+tot_sess_min_qy;
if last.cnsm_id then do;
pc_pct = tot_pc_min/tot_min;
tb_pct = tot_tb_min/tot_min;
sp_pct = tot_sp_min/tot_min;
avg_min = tot_min/order_freq;
avg_num = tot_num/order_freq;
output;
end;
keep it_qy cnsm_id
tot_pc_min
tot_tb_min
tot_sp_min
avg_min
avg_num
pc_pct
tb_pct
sp_pct;
run;
proc sql;
create table sessionwithord as
select *
from ordprod_cust as o inner join customerlevel_session as s
on o.cnsm_id=s.cnsm_id;
*customer demographic data clean and merge;
data clean_cust;
set imcdata.cust;
if marital_stat in ('M','A') then known_marriage=1;
else if marital_stat in ('S','B') then known_marriage=0;
else delete;
if online_dols="" then online_dols='L';
if hhincome=. then hhincome=9;
if age=. then age=47;
if dwelling='S' then singleunit=1;
else if dwelling='M' then singleunit=0;
else delete;
if prkids='Y' then havekids=1;
else havekids=0;
if educ in (2,3) then educ=1;
else if educ in (1,4) then educ=0;
else delete;
proc sort data = clean_cust out=custsort;
by cnsm_id; run;
proc sql;
create table fulldata as
select c.cnsm_id, *
from custsort as c inner join sessionwithord as s
on c.cnsm_id=s.cnsm_id;
proc freq data=fulldata;
table freq; run;
*Delete one-time customers;
data fulldata_clean;
set fulldata;
if freq > 1;
avg_qty = tot_qty/freq;
run;
* factor analysis - qty;
proc factor data = fulldata_clean rotate=varimax out=fact nfactors=5
reorder fuzz= 0.3; *out=fact nfactors=3;
var tenure recency freq avg_spending
spec_cd_pct
incentive_freq_pct
qty_con_pct qty_fresh_pct
qty_cooking_pct qty_hf_pct
qty_hb_pct
avg_min avg_num
tb_pct
sp_pct
pc_pct
it_qy;
run;
* factor analysis - spending;
proc factor data = fulldata_clean rotate=varimax reorder fuzz= 0.3 out=fact
nfactors=5;
var tenure recency freq avg_spending
incentive_freq_pct spending_ds_pct spending_con_pct
spending_fresh_pct spending_cooking_pct
spending_hf_pct spending_hb_pct;
label
factor1='Long-Term Active High Spenders'
factor2='Home & Health Shoppers'
factor3='Convenience/Fast Cookers'
factor4='Snack Lovers that Rarely Cook'
factor5='Inactive Incentive Seekers';
run;
*cluster analysis;
proc fastclus data=fact maxclusters=75 maxiter =1 mean=seed;
var factor1-factor5;
proc sort data=seed;
by descending _freq_;
*Develop Multiple Cluster Solutions;
proc fastclus data=fact maxclusters=7 drift seed=seed(obs=7)
maxiter=100 converge=0;
var factor1-factor5;
*Create Final Cluster Seeds;
proc fastclus data=fact maxclusters=6 seed=seed(obs=6)
maxiter=100 strict=1 mean=seed;
var factor1-factor5;
proc fastclus data=fact maxclusters=6 seed=seed(obs=6)
maxiter=0 replace=none out=scores;
var factor1-factor5;
*Profiling the Final Cluster Solution with PROC TABULATE;
proc tabulate data=scores format=comma8.4;
class cluster;
var factor1-factor5 tenure recency freq avg_spending
incentive_freq_pct spending_ds_pct spending_con_pct
spending_fresh_pct spending_cooking_pct
spending_hf_pct spending_hb_pct hhincome age educ
known_marriage singleunit havekids;
table
n(factor1-factor5 tenure recency freq avg_spending
incentive_freq_pct spending_ds_pct spending_con_pct
spending_fresh_pct spending_cooking_pct
spending_hf_pct spending_hb_pct hhincome age educ
known_marriage singleunit havekids)*mean, cluster all;
title2 'Cluster Profiles';
run;

More Related Content

Similar to Customer Segmentation for Peapod

How I Learned to Meal Plan for an Entire Week in only Minutes
How I Learned to Meal Plan for an Entire Week in only MinutesHow I Learned to Meal Plan for an Entire Week in only Minutes
How I Learned to Meal Plan for an Entire Week in only Minutes
Jenn Espinosa-Goswami
 
Landry howto tellourorganicstory_communicationsandmarketingworkshop_ea
Landry howto tellourorganicstory_communicationsandmarketingworkshop_eaLandry howto tellourorganicstory_communicationsandmarketingworkshop_ea
Landry howto tellourorganicstory_communicationsandmarketingworkshop_ea
acornorganic
 
REPOSITIONING STRATEGY - The classic case of Our Native village, Eco resort
REPOSITIONING STRATEGY - The classic case of Our Native village, Eco resortREPOSITIONING STRATEGY - The classic case of Our Native village, Eco resort
REPOSITIONING STRATEGY - The classic case of Our Native village, Eco resortDeepak Annamalai
 
Business report (1)
Business report (1)Business report (1)
Business report (1)
yenweizheng
 
business report.docx
business report.docxbusiness report.docx
business report.docxOng Shi Hui
 
Business Project 2 Report
Business Project 2 ReportBusiness Project 2 Report
Business Project 2 Report
Bolin Loong
 
2013 IFT Chicago What Consumers Want from Industry Regarding Food for Children
2013 IFT Chicago What Consumers Want from Industry Regarding Food for Children2013 IFT Chicago What Consumers Want from Industry Regarding Food for Children
2013 IFT Chicago What Consumers Want from Industry Regarding Food for Children
Linda Ettinger Lieberman
 
FINAL_capstone SOC101716 Group 1020
FINAL_capstone SOC101716 Group 1020FINAL_capstone SOC101716 Group 1020
FINAL_capstone SOC101716 Group 1020Charlie Cota
 
Functional Foods and Beverage Merchandising Strategy
Functional Foods and Beverage Merchandising StrategyFunctional Foods and Beverage Merchandising Strategy
Functional Foods and Beverage Merchandising Strategy
Joshua Schall, MBA
 
Daber Pani
Daber PaniDaber Pani
Daber Pani
Rayhan Sobhan
 
Care bakery proposal
Care bakery proposalCare bakery proposal
Care bakery proposalDavid FC
 
Nutrition Strategies in Worksite Wellness by TDSHS
Nutrition Strategies in Worksite Wellness by TDSHSNutrition Strategies in Worksite Wellness by TDSHS
Nutrition Strategies in Worksite Wellness by TDSHS
Atlantic Training, LLC.
 
Ruchi Soya Atta Mix Packaging Case Study 211207
Ruchi Soya Atta Mix Packaging Case Study 211207Ruchi Soya Atta Mix Packaging Case Study 211207
Ruchi Soya Atta Mix Packaging Case Study 211207shekharbadve
 
Topt engr 245 lean launchpad stanford 2019
Topt engr 245 lean launchpad stanford 2019Topt engr 245 lean launchpad stanford 2019
Topt engr 245 lean launchpad stanford 2019
Stanford University
 
How To Save Money On Food
How To Save Money On FoodHow To Save Money On Food
How To Save Money On Food
joesavesmoney
 
Whole foods market project
Whole foods market projectWhole foods market project
Whole foods market projectFortune10
 
Paii Webinar
Paii WebinarPaii Webinar
Paii Webinar
Forfeng Designs
 
Dolce, Sweet bean syrup group # 01
Dolce, Sweet bean syrup   group # 01  Dolce, Sweet bean syrup   group # 01
Dolce, Sweet bean syrup group # 01
MAX GALARZA HERNANDEZ
 
Start Over Strategy For Tomorrow's Future
Start Over Strategy For Tomorrow's FutureStart Over Strategy For Tomorrow's Future
Start Over Strategy For Tomorrow's Future
Thoughtworks
 

Similar to Customer Segmentation for Peapod (20)

How I Learned to Meal Plan for an Entire Week in only Minutes
How I Learned to Meal Plan for an Entire Week in only MinutesHow I Learned to Meal Plan for an Entire Week in only Minutes
How I Learned to Meal Plan for an Entire Week in only Minutes
 
Landry howto tellourorganicstory_communicationsandmarketingworkshop_ea
Landry howto tellourorganicstory_communicationsandmarketingworkshop_eaLandry howto tellourorganicstory_communicationsandmarketingworkshop_ea
Landry howto tellourorganicstory_communicationsandmarketingworkshop_ea
 
REPOSITIONING STRATEGY - The classic case of Our Native village, Eco resort
REPOSITIONING STRATEGY - The classic case of Our Native village, Eco resortREPOSITIONING STRATEGY - The classic case of Our Native village, Eco resort
REPOSITIONING STRATEGY - The classic case of Our Native village, Eco resort
 
Business report (1)
Business report (1)Business report (1)
Business report (1)
 
business report.docx
business report.docxbusiness report.docx
business report.docx
 
Business Project 2 Report
Business Project 2 ReportBusiness Project 2 Report
Business Project 2 Report
 
Power ColoProposal
Power ColoProposalPower ColoProposal
Power ColoProposal
 
2013 IFT Chicago What Consumers Want from Industry Regarding Food for Children
2013 IFT Chicago What Consumers Want from Industry Regarding Food for Children2013 IFT Chicago What Consumers Want from Industry Regarding Food for Children
2013 IFT Chicago What Consumers Want from Industry Regarding Food for Children
 
FINAL_capstone SOC101716 Group 1020
FINAL_capstone SOC101716 Group 1020FINAL_capstone SOC101716 Group 1020
FINAL_capstone SOC101716 Group 1020
 
Functional Foods and Beverage Merchandising Strategy
Functional Foods and Beverage Merchandising StrategyFunctional Foods and Beverage Merchandising Strategy
Functional Foods and Beverage Merchandising Strategy
 
Daber Pani
Daber PaniDaber Pani
Daber Pani
 
Care bakery proposal
Care bakery proposalCare bakery proposal
Care bakery proposal
 
Nutrition Strategies in Worksite Wellness by TDSHS
Nutrition Strategies in Worksite Wellness by TDSHSNutrition Strategies in Worksite Wellness by TDSHS
Nutrition Strategies in Worksite Wellness by TDSHS
 
Ruchi Soya Atta Mix Packaging Case Study 211207
Ruchi Soya Atta Mix Packaging Case Study 211207Ruchi Soya Atta Mix Packaging Case Study 211207
Ruchi Soya Atta Mix Packaging Case Study 211207
 
Topt engr 245 lean launchpad stanford 2019
Topt engr 245 lean launchpad stanford 2019Topt engr 245 lean launchpad stanford 2019
Topt engr 245 lean launchpad stanford 2019
 
How To Save Money On Food
How To Save Money On FoodHow To Save Money On Food
How To Save Money On Food
 
Whole foods market project
Whole foods market projectWhole foods market project
Whole foods market project
 
Paii Webinar
Paii WebinarPaii Webinar
Paii Webinar
 
Dolce, Sweet bean syrup group # 01
Dolce, Sweet bean syrup   group # 01  Dolce, Sweet bean syrup   group # 01
Dolce, Sweet bean syrup group # 01
 
Start Over Strategy For Tomorrow's Future
Start Over Strategy For Tomorrow's FutureStart Over Strategy For Tomorrow's Future
Start Over Strategy For Tomorrow's Future
 

Recently uploaded

Digital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
Digital Marketing Trends - Experts Insights on How to Gain a Competitive EdgeDigital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
Digital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
Digital Marketing Trends - Experts Insights on How
Digital Marketing Trends - Experts Insights on HowDigital Marketing Trends - Experts Insights on How
Generative AI - Unleash Creative Opportunity - Peter Weltman
Generative AI - Unleash Creative Opportunity - Peter WeltmanGenerative AI - Unleash Creative Opportunity - Peter Weltman
Generative AI - Unleash Creative Opportunity - Peter Weltman
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
Core Web Vitals SEO Workshop - improve your performance [pdf]
Core Web Vitals SEO Workshop - improve your performance [pdf]Core Web Vitals SEO Workshop - improve your performance [pdf]
Core Web Vitals SEO Workshop - improve your performance [pdf]
Peter Mead
 
Winning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis YuWinning local SEO in the Age of AI - Dennis Yu
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
Valters Lauzums
 
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel LeminTurn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
Digital Marketing Training In Bangalore
Digital Marketing Training In BangaloreDigital Marketing Training In Bangalore
Digital Marketing Training In Bangalore
syedasifsyed46
 
Winning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis YuWinning local SEO in the Age of AI - Dennis Yu
Coca Cola Branding Strategy and strategic marketing plan
Coca Cola Branding Strategy and strategic marketing planCoca Cola Branding Strategy and strategic marketing plan
Coca Cola Branding Strategy and strategic marketing plan
Maswer Ali
 
5 Big Bets for 2024 - Jamie A. Lee, Stripes Co
5 Big Bets for 2024 - Jamie A. Lee, Stripes Co5 Big Bets for 2024 - Jamie A. Lee, Stripes Co
34-Rahul-Mande.pdf PROJECT REPORT MBA 4TH SEMESTER
34-Rahul-Mande.pdf PROJECT REPORT MBA 4TH SEMESTER34-Rahul-Mande.pdf PROJECT REPORT MBA 4TH SEMESTER
34-Rahul-Mande.pdf PROJECT REPORT MBA 4TH SEMESTER
DeepakTripathi733493
 
Top 3 Ways to Align Sales and Marketing Teams for Rapid Growth
Top 3 Ways to Align Sales and Marketing Teams for Rapid GrowthTop 3 Ways to Align Sales and Marketing Teams for Rapid Growth
Top 3 Ways to Align Sales and Marketing Teams for Rapid Growth
Demandbase
 
The New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
The New Era Of SEO - How AI Has Changed SEO Forever - Danny LeibrandtThe New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
The New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
May 2024 - VBOUT Partners Meeting Group Session
May 2024 - VBOUT Partners Meeting Group SessionMay 2024 - VBOUT Partners Meeting Group Session
May 2024 - VBOUT Partners Meeting Group Session
Vbout.com
 
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel LeminTurn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
Email Marketing Master Class - Chris Ferris
Email Marketing Master Class - Chris FerrisEmail Marketing Master Class - Chris Ferris
SMM Cheap - No. 1 SMM panel in the world
SMM Cheap - No. 1 SMM panel in the worldSMM Cheap - No. 1 SMM panel in the world
SMM Cheap - No. 1 SMM panel in the world
smmpanel567
 

Recently uploaded (20)

Digital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
Digital Marketing Trends - Experts Insights on How to Gain a Competitive EdgeDigital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
Digital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
 
Digital Marketing Trends - Experts Insights on How
Digital Marketing Trends - Experts Insights on HowDigital Marketing Trends - Experts Insights on How
Digital Marketing Trends - Experts Insights on How
 
Generative AI - Unleash Creative Opportunity - Peter Weltman
Generative AI - Unleash Creative Opportunity - Peter WeltmanGenerative AI - Unleash Creative Opportunity - Peter Weltman
Generative AI - Unleash Creative Opportunity - Peter Weltman
 
Core Web Vitals SEO Workshop - improve your performance [pdf]
Core Web Vitals SEO Workshop - improve your performance [pdf]Core Web Vitals SEO Workshop - improve your performance [pdf]
Core Web Vitals SEO Workshop - improve your performance [pdf]
 
Winning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis YuWinning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis Yu
 
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
Digital Commerce Lecture for Advanced Digital & Social Media Strategy at UCLA...
 
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel LeminTurn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
 
Digital Marketing Training In Bangalore
Digital Marketing Training In BangaloreDigital Marketing Training In Bangalore
Digital Marketing Training In Bangalore
 
Winning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis YuWinning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis Yu
 
Coca Cola Branding Strategy and strategic marketing plan
Coca Cola Branding Strategy and strategic marketing planCoca Cola Branding Strategy and strategic marketing plan
Coca Cola Branding Strategy and strategic marketing plan
 
5 Big Bets for 2024 - Jamie A. Lee, Stripes Co
5 Big Bets for 2024 - Jamie A. Lee, Stripes Co5 Big Bets for 2024 - Jamie A. Lee, Stripes Co
5 Big Bets for 2024 - Jamie A. Lee, Stripes Co
 
34-Rahul-Mande.pdf PROJECT REPORT MBA 4TH SEMESTER
34-Rahul-Mande.pdf PROJECT REPORT MBA 4TH SEMESTER34-Rahul-Mande.pdf PROJECT REPORT MBA 4TH SEMESTER
34-Rahul-Mande.pdf PROJECT REPORT MBA 4TH SEMESTER
 
Top 3 Ways to Align Sales and Marketing Teams for Rapid Growth
Top 3 Ways to Align Sales and Marketing Teams for Rapid GrowthTop 3 Ways to Align Sales and Marketing Teams for Rapid Growth
Top 3 Ways to Align Sales and Marketing Teams for Rapid Growth
 
The New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
The New Era Of SEO - How AI Has Changed SEO Forever - Danny LeibrandtThe New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
The New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
 
Metaverse Marketing in the Generation of the Internet - Eugene Capon
Metaverse Marketing in the Generation of the Internet - Eugene CaponMetaverse Marketing in the Generation of the Internet - Eugene Capon
Metaverse Marketing in the Generation of the Internet - Eugene Capon
 
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
 
May 2024 - VBOUT Partners Meeting Group Session
May 2024 - VBOUT Partners Meeting Group SessionMay 2024 - VBOUT Partners Meeting Group Session
May 2024 - VBOUT Partners Meeting Group Session
 
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel LeminTurn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
 
Email Marketing Master Class - Chris Ferris
Email Marketing Master Class - Chris FerrisEmail Marketing Master Class - Chris Ferris
Email Marketing Master Class - Chris Ferris
 
SMM Cheap - No. 1 SMM panel in the world
SMM Cheap - No. 1 SMM panel in the worldSMM Cheap - No. 1 SMM panel in the world
SMM Cheap - No. 1 SMM panel in the world
 

Customer Segmentation for Peapod

  • 1. Online Grocery Store Segmentation Eric Xiong, Elaine Su, Tianhong Chu, Dannie Hu, Biying Pan
  • 2. Methodology 1. a. Identify Key Variables b. Develop Key Behavior Dimensions c. Segment & Profile Customers d. Recommendations
  • 3. Key Variables for Analysis Demographics We did not use demographic variables (most of them are categorical variables) for our factor analysis since we read that there may be issues related to using categorical variables in factor analysis Order Behavior ● Tenure ● Recency ● Frequency ● Average spending per order ● Percentage of purchases with incentives Order Category Spending Percentage of : ● Drinks & Snacks ● Fresh Food ● Cooking Ingredients ● House & Family Care ● Health & Beauty ● Indulgence ● Dairy ● Other
  • 4. Key Behavioral Dimensions 1. Long-Term Frequent High Spenders 2. Home & Health Shoppers 3. Convenience/Fast Cookers 4. Snack Lovers 5. Inactive Incentive Seekers
  • 6. Segments Overview Key Take Aways: Loyal Chris and home-loving Jenna are our top two customers in terms of frequency and average spending per order.
  • 7. Segment Profiles Loyal Chris Home-loving Jenna ● Married, MBA Graduate ● Medill professor, Data Scientist ● Best customer: purchase most frequently, spends the most money per order and has been a customer for the longest time ● No strong preference of any specific product category ● Married, 2 kids, IMC Master Graduate ● Part-time housewife, proud mom ● Purchases the most House & Family Care products for her family and Health & Beauty products to take care of herself ● Single, College Dropout ● Full-time Uber Driver ● Loves video game and comics ● Too lazy to cook so he purchases a lot of convenient frozen and pre-made food but very few fresh food Lazy Andrew
  • 8. Segment Profiles One-time SeanFrugal Omar Snacker RushilFresh Alex ● Married, 4 kids ● Saves money to raise family ● Most inactive, purchases least frequently ● Very price sensitive: a lot more likely to buy products at our store when there’s an incentive or discount. ● Married, 2 kids ● Spends the least amount per order ● Loves eating snacks and purchases a lot of snacks for his kids and himself ● Busy with work, rarely cooks anything himself at home ● Married, College Graduate ● Crossfit Enthusiast ● Health-conscious: cares about the quality of food ● Purchases the most fresh food and tries to avoid snacks and frozen and pre-made food ● Only purchased at our store once and it is most likely because there was a special offer or coupon given to him ● Spends the least amount on his orders
  • 9. High Profit Long Term Customers Accounts for 17.7% of the total customers Highest average spending level (1.2 times compared to overall average) 3 times more frequent to shop at our store than overall frequency Has been shopping with us for an average of over 7 years Upper-Class Customers Has the highest education levels Are more likely to be married and have kids Has the highest income and lives in single unit houses Target Audience: The Loyalists
  • 10. Recommendation: Loyal Chris ● Create a loyalty program to reward customers: e.g. earn points for every qualifying purchase and get rewards ● Provide a special level of services: e.g. personal customer representatives, faster shipping options, free gifts on special occasions. ● Reward introductions and referrals: offer rewards in return for introducing new customers to place orders, because Loyal Chris can provide better word of mouth, and may thus more easily introduce similar upper-level customers. RETAIN+ACQUIRE
  • 11. High Profit Frequent Customers Accounts for 15.2% of the total customers Second highest average spending (1.07 times compared to overall average) Second highest frequency level Home Caring Lovers Second highest percentage of high education and marriage status High income customers Interested in purchasing non-grocery items that are related to home, family, beauty and health Target Audience: The Home-Lovers
  • 12. Recommendation:Home-loving Jenna ● Online automatic subscription: Household, beauty and health products with a steady consumption rate are well suited to online purchasing. Easier for time-crunched consumers to get the items they need. ● Influencers and social media: Partnering with bloggers to increase product awareness and creating promotion in the social media. ● Pairing like products: Pairing complementary products with a promotional price on the set will capitalize customers’ perceived value. GROWTH
  • 18. Final Code libname imcdata '/projects/e30509/imc486'; proc datasets lib=imcdata; quit; run; * data read-in; data ordprod; set imcdata.ordprod; run; proc print data=ordprod(obs=20); run; data lookup; set imcdata.lookup; run; proc print data=lookup(obs=20); run; *categorize minor_cat into 8 major categories; data lookup1; set lookup; if index(minor_cat, "JUICE") + index(minor_cat, "BEVERAGES") + index(minor_cat,"SNACKS") then major_cat="Drinks & Snacks"; else if index(minor_cat, "FROZEN") + index(minor_cat, "PACK") + index(minor_cat, "REFRIG") + index(minor_cat, "CANNED") + index(minor_cat, "INSTANT") + index(minor_cat, "BOXED") > 0 then major_cat = "ConvenienceFood"; else if index(minor_cat, "FRESH") > 0 then major_cat = "Fresh Food"; else if index(minor_cat, "DAIRY") > 0 then major_cat = "Dairy"; else if index(minor_cat, "GROC") > 0 then major_cat = "Cooking Ingredients"; else if index(minor_cat, "HB") > 0 then major_cat = "Health & Beauty"; else if index(minor_cat, "HH") + index(minor_cat, "HG") + index(minor_cat,"BABY") + index(minor_cat, "PET") > 0 then major_cat = "Home & Family Care" ; else if index(minor_cat, "ALCOHOL") + index(minor_cat, "CIGARETTES") + index(minor_cat, "CIGARS/CHEWING") > 0 then major_cat = "Indulgence"; else major_cat = "Other"; run; proc freq data=lookup1; table major_cat; run; * join minor_cat to ordprod table; proc sql; create table ordprod_cat as select ord_id, spec_cd, it_qy, it_pr_qy, tot_pr_qy, major_cat from ordprod as o left join lookup1 as l on o.pod_id = l.pod_id; quit; proc freq data=ordprod_cat; table major_cat; run; * join cnsm_id to ordprod table; data order; set imcdata.order; if cnsm_id = "" then delete; if it_dmnd_qy = . then delete; if ord_seq_num = . then delete; if sale_inct_qy = . then sale_inct_qy = 0; run; proc sql; create table ordprod_cat1 as select cnsm_id, spec_cd, it_qy, it_pr_qy, tot_pr_qy, major_cat from ordprod_cat as o inner join order as i on o.ord_id = i.ord_id; quit;
  • 19. * roll - up ordprod to customer level; proc sort data = ordprod_cat1 out = ordprod_cat_s; by cnsm_id; run; data ordprod_cat_cust; set ordprod_cat_s; by cnsm_id; retain spec_cd_qty tot_qty spending_tot qty_ds qty_con qty_fresh qty_dairy qty_cooking qty_hb qty_hf qty_indul qty_other spending_ds spending_con spending_fresh spending_dairy spending_cooking spending_hb spending_hf spending_indul spending_other; if first.cnsm_id then do; tot_qty = 0; spec_cd_qty = 0; spending_tot = 0; qty_ds = 0; qty_con = 0; qty_fresh = 0; qty_dairy = 0; qty_cooking = 0; qty_hb = 0; qty_hf = 0; qty_indul = 0; qty_other = 0; spending_ds = 0; spending_con = 0; spending_fresh = 0; spending_dairy = 0; spending_cooking = 0; spending_hb = 0; spending_hf = 0; spending_indul = 0; spending_other = 0; end; tot_qty = tot_qty + it_qy; spending_tot = spending_tot + tot_pr_qy; if spec_cd = "*" then do; spec_cd_qty = spec_cd_qty + it_qy; end; if major_cat = "Drinks & Snacks" then do; qty_ds = qty_ds + it_qy; spending_ds = spending_ds + tot_pr_qy; end; else if major_cat = "ConvenienceFood" then do; qty_con = qty_con + it_qy; spending_con = spending_con + tot_pr_qy; end; else if major_cat = "Fresh Food" then do; qty_fresh = qty_fresh + it_qy; spending_fresh = spending_fresh + tot_pr_qy; end; else if major_cat = "Dairy" then do; qty_dairy = qty_dairy + it_qy; spending_dairy = spending_dairy + tot_pr_qy; end; else if major_cat ="Cooking Ingredients" then do; qty_cooking = qty_cooking + it_qy; spending_cooking = spending_cooking + tot_pr_qy; end; else if major_cat = "Home & Family Care" then do; qty_hf= qty_hf + it_qy; spending_hf = spending_hf + tot_pr_qy; end; else if major_cat = "Health & Beauty" then do; qty_hb = qty_hb + it_qy; spending_hb = spending_hb + tot_pr_qy; end; else if major_cat = "Indulgence" then do; qty_indul = qty_indul + it_qy; spending_indul = spending_indul + tot_pr_qy; end; else if major_cat = "Other" then do; qty_other = qty_other + it_qy; spending_other = spending_other + tot_pr_qy; end; if last.cnsm_id then do; if spending_tot = 0 then delete; if tot_qty = 0 then delete; qty_ds_pct = qty_ds/tot_qty; qty_con_pct = qty_con/tot_qty; qty_fresh_pct = qty_fresh/tot_qty; qty_dairy_pct = qty_dairy/tot_qty; qty_cooking_pct = qty_cooking/tot_qty; qty_hf_pct = qty_hf/tot_qty; qty_hb_pct = qty_hb/tot_qty; qty_indul_pct = qty_indul/tot_qty; qty_other_pct = qty_other/tot_qty; spending_ds_pct = spending_ds/spending_tot; spending_con_pct = spending_con/spending_tot; spending_fresh_pct = spending_fresh/spending_tot; spending_dairy_pct = spending_dairy/spending_tot; spending_cooking_pct = spending_cooking/spending_tot; spending_hf_pct = spending_hf/spending_tot; spending_hb_pct = spending_hb/spending_tot; spending_indul_pct = spending_indul/spending_tot; spending_other_pct = spending_other/spending_tot; spec_cd_pct = spec_cd_qty/tot_qty; output; end; keep it_qy cnsm_id spec_cd_pct qty_ds_pct qty_con_pct qty_fresh_pct qty_dairy_pct qty_cooking_pct qty_hf_pct qty_hb_pct qty_indul_pct qty_other_pct
  • 20. spending_ds_pct spending_con_pct spending_fresh_pct spending_dairy_pct spending_cooking_pct spending_hf_pct spending_hb_pct spending_indul_pct spending_other_pct spending_tot tot_qty; run; * order data - roll up to customer level; proc sort data = order out = order_s; by cnsm_id; run; *maximum date in the table; proc means data=order_s; var dlv_dt; run; data order_cust; set order_s; by cnsm_id; retain frstdt lastdt freq tot_spending tot_incentive incentive_freq; if first.cnsm_id then do; frstdt = '31DEC2099'd; lastdt = '31DEC1850'd; freq = 0; tot_spending = 0; tot_incentive = 0; incentive_freq = 0; end; tot_spending = tot_spending + it_dmnd_qy; tot_incentive = tot_incentive + sale_inct_qy; if dlv_dt lt frstdt then frstdt = dlv_dt; if dlv_dt gt lastdt then lastdt = dlv_dt; if ord_seq_num gt freq then freq = ord_seq_num; if sale_inct_qy < 0 then incentive_freq = incentive_freq + 1; if last.cnsm_id then do; tenure = (19534 - frstdt)/365.25; recency = (19534 - lastdt)/365.25; avg_spending = tot_spending/freq; tot_incentive_pct = tot_incentive/tot_spending; incentive_freq_pct = incentive_freq/freq; output; end; keep cnsm_id tenure recency freq avg_spending tot_incentive_pct incentive_freq_pct;run; *merge order_cust with ordprod_cust; proc sql; create table ordprod_cust as select o.cnsm_id, tenure, recency, freq, avg_spending, tot_incentive_pct, incentive_freq_pct, spec_cd_pct, qty_ds_pct, qty_con_pct, qty_fresh_pct,qty_dairy_pct, qty_cooking_pct, qty_hf_pct, qty_hb_pct, qty_indul_pct, qty_other_pct, spending_ds_pct, spending_con_pct, spending_fresh_pct, spending_dairy_pct, spending_cooking_pct, spending_hf_pct, spending_hb_pct, spending_indul_pct, spending_other_pct, spending_tot, tot_qty, it_qy from order_cust as o inner join ordprod_cat_cust as l on o.cnsm_id = l.cnsm_id; quit; *digital engagement; proc sql; create table sessionwithid as select cnsm_id, s.ord_id, dvce_type, s.dlv_dt, plfm, sess_num_qy, tot_sess_min_qy,sesstype from imcdata.session as s inner join imcdata.order as o on s.ord_id=o.ord_id; proc sort data=sessionwithid; by cnsm_id; run; data customerlevel_session; set sessionwithid; by cnsm_id; retain tot_min tot_num tot_pc_min tot_tb_min tot_sp_min order_freq; if first.cnsm_id then do; tot_min=0; tot_num=0; tot_pc_min=0; tot_tb_min=0; tot_sp_min=0; order_freq = 0; end; tot_min=tot_min+tot_sess_min_qy; tot_num=tot_num+sess_num_qy; order_freq = order_freq + 1; if sesstype='PC' then tot_pc_min=tot_pc_min+tot_sess_min_qy; if sesstype='TB' then tot_tb_min=tot_tb_min+tot_sess_min_qy; if sesstype='SP' then tot_sp_min=tot_sp_min+tot_sess_min_qy; if last.cnsm_id then do; pc_pct = tot_pc_min/tot_min; tb_pct = tot_tb_min/tot_min; sp_pct = tot_sp_min/tot_min; avg_min = tot_min/order_freq; avg_num = tot_num/order_freq; output; end; keep it_qy cnsm_id tot_pc_min tot_tb_min tot_sp_min
  • 21. avg_min avg_num pc_pct tb_pct sp_pct; run; proc sql; create table sessionwithord as select * from ordprod_cust as o inner join customerlevel_session as s on o.cnsm_id=s.cnsm_id; *customer demographic data clean and merge; data clean_cust; set imcdata.cust; if marital_stat in ('M','A') then known_marriage=1; else if marital_stat in ('S','B') then known_marriage=0; else delete; if online_dols="" then online_dols='L'; if hhincome=. then hhincome=9; if age=. then age=47; if dwelling='S' then singleunit=1; else if dwelling='M' then singleunit=0; else delete; if prkids='Y' then havekids=1; else havekids=0; if educ in (2,3) then educ=1; else if educ in (1,4) then educ=0; else delete; proc sort data = clean_cust out=custsort; by cnsm_id; run; proc sql; create table fulldata as select c.cnsm_id, * from custsort as c inner join sessionwithord as s on c.cnsm_id=s.cnsm_id; proc freq data=fulldata; table freq; run; *Delete one-time customers; data fulldata_clean; set fulldata; if freq > 1; avg_qty = tot_qty/freq; run; * factor analysis - qty; proc factor data = fulldata_clean rotate=varimax out=fact nfactors=5 reorder fuzz= 0.3; *out=fact nfactors=3; var tenure recency freq avg_spending spec_cd_pct incentive_freq_pct qty_con_pct qty_fresh_pct qty_cooking_pct qty_hf_pct qty_hb_pct avg_min avg_num tb_pct sp_pct pc_pct it_qy; run; * factor analysis - spending; proc factor data = fulldata_clean rotate=varimax reorder fuzz= 0.3 out=fact nfactors=5; var tenure recency freq avg_spending incentive_freq_pct spending_ds_pct spending_con_pct spending_fresh_pct spending_cooking_pct spending_hf_pct spending_hb_pct; label factor1='Long-Term Active High Spenders' factor2='Home & Health Shoppers' factor3='Convenience/Fast Cookers' factor4='Snack Lovers that Rarely Cook' factor5='Inactive Incentive Seekers'; run; *cluster analysis; proc fastclus data=fact maxclusters=75 maxiter =1 mean=seed; var factor1-factor5; proc sort data=seed; by descending _freq_; *Develop Multiple Cluster Solutions; proc fastclus data=fact maxclusters=7 drift seed=seed(obs=7) maxiter=100 converge=0; var factor1-factor5; *Create Final Cluster Seeds; proc fastclus data=fact maxclusters=6 seed=seed(obs=6) maxiter=100 strict=1 mean=seed; var factor1-factor5; proc fastclus data=fact maxclusters=6 seed=seed(obs=6) maxiter=0 replace=none out=scores; var factor1-factor5; *Profiling the Final Cluster Solution with PROC TABULATE; proc tabulate data=scores format=comma8.4; class cluster; var factor1-factor5 tenure recency freq avg_spending incentive_freq_pct spending_ds_pct spending_con_pct spending_fresh_pct spending_cooking_pct spending_hf_pct spending_hb_pct hhincome age educ known_marriage singleunit havekids; table n(factor1-factor5 tenure recency freq avg_spending incentive_freq_pct spending_ds_pct spending_con_pct spending_fresh_pct spending_cooking_pct spending_hf_pct spending_hb_pct hhincome age educ known_marriage singleunit havekids)*mean, cluster all; title2 'Cluster Profiles'; run;