turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Correlation Analysis of Multiple Binary Variables

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

03-28-2012 12:04 PM

PLEASE Help!

I have a dataset of customers who are flagged with whether they have viewed a film or not. Each row represents a customer. Each column represents a film, where a 0 or 1 states whether they have seen that film or not. I need to work out the correlation between these films i.e. if people watch X they are also most likely to have watched Y. A simple way would be to cross tab all variables so that I create a dataset with all films as a row and all films as a column, with the count of customers who had seen each film pairing. I don't know how to do this so I thought if my variables were continuous, a standard PROC CORR would give me all the information I need in matrix form i.e. the correlation coefficient and the frequency of customers. But how do I create this when my variables are binary? Or can anyone help me with creating the count matrix?

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to AmandaEHS

03-28-2012 01:11 PM

You want to calculate a phi coefficient as a measure of association for binary data. If you run the usual Pearson correlation in Proc Corr on binary data, the measure you get will be the phi coefficient, as they are equivalent.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to AmandaEHS

03-28-2012 11:14 PM

I don't think you have a good idea here. and also don't need to make a new dataset.

proc corr only consider the correlation of two variables which has bivariate normal distribution ,it wouldn't consider the influence of other variable(i.e. other film ) to a variable ----- which are named partial correlation.

I think you should use Cluster Analysis to see which film belong to which cluster.

I highly recommend you to post it at SAS Statistical Procedure , where has some experts such as Steve, lvm, Rick, they are all seasoned statistician . Thay can give you a whole explanation about your question.

Ksharp