1
$\begingroup$

Variable X designates a group label (group 1, group 2, etc). Each group represents an amount of time spent watching TV. For example group 1 might watch TV less than an hour a week, group 2 watches 1-2 hours, etc. In general group K watches more TV than group K-1.

Variable Y is a binary variable, 1 or 0, denoting whether or not someone watches a popular TV show.

Right now I am doing a correlation with Pearson's R but I don't know if this makes the most sense (the correlation is somewhat low because a lot of people watch the show regardless of the group). Is there a more appropriate model / test for this kind of arrangement?

$\endgroup$

3 Answers 3

1
$\begingroup$

You have an ordinal and a binary variable; for which it is more appropriate to use Rank correlation (e.g. Spearman or Kendall). Rank correlation looks at the monotonic relationship, while Pearson is concerned with the linear relationship between two variables. Pearson is more appropriate for continuous-continous, and (optionally) continuous-binary cases. Since you are talking about ordinal scales, you are more likely interested in rank correlation. But I would try both and compare the results, taking into account the points listed here.

EDIT: In terms of implementation, you have alraedy calculated Pearson correlation in R. You use the same cor() function for calculating Spearman and Kendall correlations:

?cor
cor(x, y = NULL, use = "everything", method = c("pearson", "kendall", "spearman"))

If you only have access to Excel, check this out.

P.S: your question is linked to this other thread on CrossValidated, which you may want to check out.

$\endgroup$
3
  • $\begingroup$ @user62753, Do you mean how to calculate them? $\endgroup$
    – Zhubarb
    Commented May 5, 2015 at 13:13
  • $\begingroup$ @user62753, I have edited my question to show how you can implement them in R and MS Excel. As to when to implement which and why rank correlation may be a better idea in your case, check this. $\endgroup$
    – Zhubarb
    Commented May 5, 2015 at 13:17
  • $\begingroup$ @user62753, I added an Excel solution to my edit. $\endgroup$
    – Zhubarb
    Commented May 5, 2015 at 13:19
0
$\begingroup$

If the correlation is low it could be that one group is larger than another group that you're comparing with and hence affecting the correlation measure. One proposed way was to use phi/phimax instead of the phi coefficient. This idea is explored in a paper "Phi/Phimax: Review and Synthesis".

If you do decide to do this, you should be careful since by doing this adjustment the measure is no longer symmetrical though under certain situations the interpretation of "association" may indeed be more appropriate.


An Example

Suppose that the groups look like the following:

___  Y=1   Y=0   Total
X=1   38    42    80
X=0    2    18    20
total 40    60    100

If we calculate phi we get phi=0.31. Notice though, if we change the association so that if X=0 it will always be Y=0, yielding a table that looks like this:

___  Y=1   Y=0   Total
X=1   38    42    80
X=0    0    20    20
total 38    62    100

which does not affect the numbers in any of the groups, but merely shifts them from "watching popular shows" to everyone "not watching popular shows", our phi, only moves to phi=0.41. This number would be phimax, which would be the correction which you divide by in this situation. How this would actually look for the group X=0 would be for all possible values would be:

If we change the group X=0...

Y=1   Y=0   phi     phi/phimax
8     12    0.00     0.00
7     13    0.05     0.12
6     14    0.10     0.24
5     15    0.15     0.38
4     16    0.20     0.50
3     17    0.26     0.63
2     18    0.31     0.75
1     19    0.36     0.88
0     20    0.41     1.00

Which may make more sense, in the case where the marginal distributions are very different. If the marginal distributions are similar, then making this adjustment probably won't have any effect.

$\endgroup$
0
$\begingroup$

I think Pearson Correlation coefficient is more fit for two continous variables. If you want to test the hypothesis that whether or not someone watches a popular TV show is associated with hours of watching Tv, you may try logistic regression analysis. You treat the binary (0,1) varible as an outcome variable and your groups (or hours) as a predictor variable. If you can give me some data I can show you how to do it use SAS, R, stata or SPSS. I try to use data you provided to conduct the analysis in SAS and R. The codes are following: R:

library(foreign)
data<-read.csv("D:\\Downloads\\sampledata.csv",head=T)

results<-glm(binary ~ factor(group), family=binomial("logit"),data=data)
summary(results)
exp(coefficients(results))

SAS:

data a;
input group $ binary;
datalines;
0   1
0   1
0   1
0   1
0   1
0   1
0   1
0   0
0   1
0   1
0   1
0   1
0   0
0   1
0   1
1   1
1   1
1   1
1   0
1   0
1   1
2   1
2   1
2   1
2   1
2   1
2   1
2   0
2   1
;
run;
proc logistic data=a;
class group(ref="0" param=ref);
model binary(enent="1")=group;
run;

Results shows that there are no association between goup and watch popular TV.

Anyway, real data may be different.

R results and SAS results are the same.

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.