1
$\begingroup$

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 ?

$\endgroup$
  • $\begingroup$ If the truth is anything beyond a single food causing problems & the rest not, you are going to need a lot of data. $\endgroup$ – gung - Reinstate Monica Jun 18 '16 at 0:02
  • $\begingroup$ Please register &/or merge your accounts (you can find information on how to do this in the My Account section of our help center), then you will be able to edit & comment on your own question. $\endgroup$ – gung - Reinstate Monica Jun 18 '16 at 0:29
0
$\begingroup$

In order to analyse this you'd use an ordinal probit regression with the dependent variable being your pain rating, and the independent variable(s) being the food and the quantity of water.

Such a model would assume that your ratings of pain map onto an underlying continuous latent variable (the amount of pain you're experiencing), and would model how that latent variable varies as a function of the food you're eating and the volume of water you consume.

As gung has pointed out though, if you're interested in looking at the combination of foods then you'll need vast numbers of observations (you'd want to have a reasonable number, maybe >5, of each combination).

Really, though, if you're experiencing pain which you believe is related to your diet then either altering your diet (on the basis of patterns you observe) or seeking professional help is more important than determining the appropriate statistical approach to take

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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