BookmarkSubscribeRSS Feed
mszommer
Obsidian | Level 7

Hello,

 

I'm looking at clustering customers based on their transactional data. I have about 3000+ Products (items) in total that belong to various categories (6+) and I need to sort/group the products based on purchasing behavior of the customers. i.e., which products are bought together by the same customer.

I need to use Yule's Q measure of association (between all prooduct combinations) to prepare the input for the cluster analysis. I can pick one category at a time in order to reduce the product cominations.

 

Yule's Q is (ad - bc)/(ad+bc).
Conceptually, this is the number of pairs in agreement (ad) - the number in disagreement (bc) over the total number of paired observations.

 

How can I go about doing that using SAS. Proc Distance does not provide the option of Yule's Q

 

Any help will be more than appreciated.

 

Regards

Mari

2 REPLIES 2
Reeza
Super User

It looks like PROC FREQ can, with Gamma being equivalent to Yule's Q. 

 

It may may help if present some sample data and expected output. Although not all of us understand the specific terminology, most can code many standard formulas. 

mszommer
Obsidian | Level 7

Hello Reeza,

 

Thank you for the very prompt response.

Attached is an excel file with the requested details of the input data and desired output data.

 

Lookign forward to hearign from you

 

Regards

Mari

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1789 views
  • 0 likes
  • 2 in conversation