I need help in this problem. Really i'm in bad situation. I have these data and i should find a correlation between food likes. i'm not familiar with statistics. would you show me any example for this problem. i have no idea for that.
-
At the least, you must explain for us what the data coding means! Without that no possibility for an answer. – kjetil b halvorsen Aug 11 '15 at 12:00
3 Answers
How about just try correlations between any of two variables using Pearson or Spearman correlation coefficient.
The followings are SAS code and I use the top 10 observations in your table,
data a;
input active gender age pizza salad chocolate coffe;
datalines;
1 1 54 1 0 0 1
1 1 38 1 0 1 0
1 2 34 0 1 1 0
1 1 23 0 0 0 0
0 2 46 1 1 1 0
0 2 46 1 0 1 0
0 2 54 0 1 0 1
1 1 58 0 1 1 0
1 1 25 1 1 1 0
0 1 33 0 0 0 1
;
run;
proc corr data=a spearman Pearson;
var active gender age pizza salad chocolate coffe;
run;
Results:
It seems Coffee and Chocolate are negatively correlated (r=-0.8017, p=0.0053), i.e people who prefer coffee will not like Chocolate, and vise visa. It seems reasonable, since Coffee is bitter and Chocolate is sweet. I did not see correlations between any other two variables.
The analysis is simple but I hope it can help you.

- 4,527
- 2
- 18
- 38
The "food like" variables look like binary values, so for each pair (e.g. pizza and salad), you could use Pearson's correlation. For a general discussion about correlations between binary vectors, see this question.
It would probably make sense to also divide the data by the other variables. E.g. is there a different correlation between pizza and pasta preference for men and for women?
You can do one of two things:
1) Multinomial logistic regression.
2) Boxplots on segmented data.

- 938
- 1
- 8
- 16
-
thank you, thank you. for your answer. would you show me an example about it. i'm badly need it – Raffael Edu Aug 11 '15 at 06:41
-
The multinomial logistic regression will not work because choice of choose pizza, salad, chocolate and coffee is not mutually exclusive. – Deep North Aug 11 '15 at 11:08