I'm trying to figure out what's causing my stomach pain recently and I have logged the following data twice a day:
- A grade on a scale from 1 to 10 on how much my stomach hurts
- Foods (unique names) I've been eating (e.g., banana, yogurt, tomatoes) twice a day also
So I have my data like the following (almost 3 months of data, so ~120 lines):
14/06 AM 5 banana, tomatoe 14/06 PM 3 milk, beans, banana 15/06 AM 2 apple, meat, tomatoe 15/06 PM 3 chicken, banana, coffee 16/06 AM 6 milk, beans, chicken 16/06 PM 7 tomatoe, orange, coffee ...
How can I find the correlation (or combined occurrences) between those two set of data? Like the more I eat tomatoes with bananas, the higher my stomach hurts?
I know how to figure out the correlation between two sets of discrete values, but here I have discrete values (pain) and occurrences (food). Is there a formula for this? Can I use R?
Complementary question: I have a third column where I input how much water I drank (5 oz, 3 oz)... How can I include it in my stats ?