03-28-2012 12:04 PM
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?
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.
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.