I have two types of treatment, a and b, and I want to know if one is more painful than the other. I can apply both treatments to each patient, and ask for the pain experienced with each on a scale 0-10.
> head(df_long) n_patient type pain 1 a 2 1 b 1 2 a 7 2 b 2 3 a 1 3 b 2
Here are the results for a survey with 20 patients.
I can test for normality of the distributions. I can test for significant differences in mean pain, etc. I can also make a scatter plot with points associated to patients, (x, y)=(pain_a, pain_b), which, it seems to me, will contain useful information.
However, I'm having trouble interpreting the plot. Patients have different pain tolerances. It seems natural that a patient giving a high pain score to treatment "a" will tend to rate highly the other one (at least for a certain range of pain similarity). In this plot, a positive correlation means that as patient's pain tolerance decreases, pain ratings for both treatments increase. A perfect correlation of 1 would mean that pain experienced in both treatments is the same. In my case, I obtain the following results:
> cor.test(pain_a, pain_b, alternative = "greater", method = "pearson") Pearson's product-moment correlation data: pain_a and pain_b t = 2.1551, df = 18, p-value = 0.02247 alternative hypothesis: true correlation is greater than 0 95 percent confidence interval: 0.08914837 1.00000000 sample estimates: cor 0.452883 > lm(b ~ a, df) Call: lm(formula = b ~ a, data = df) Coefficients: (Intercept) a 1.0746 0.4102
How do I read this r = 0.45? I would say that it's relevant that this r is smaller than 1, but I don't know the formal way of stating a conclusion out of this, or if this plot is just talking about pain tolerance in general, and it's not useful for distinguishing between treatments.
Following Bernhard's answer, one thing I can do is changing the basis of my problem, to look at the total pain experienced by the patient, $sum = a + b$, and the difference in pain, $diff = b - a$. Now variable $diff$ is restricted to the domain $[-sum, sum]$ for each $sum$ pain experienced by each patient, and the correlation and linear model that can be extracted from the scatter plot make much more sense.
For my invented example data though, I don't get any relevant results
> cor.test(pain_sum, pain_diff, method = "pearson") Pearson's product-moment correlation data: pain_sum and pain_diff t = -0.47175, df = 18, p-value = 0.6428 alternative hypothesis: true correlation is not equal to 0 95 percent confidence interval: -0.5272479 0.3490807 sample estimates: cor -0.1105114 > lm(diff ~ sum, df_sd) Call: lm(formula = diff ~ sum, data = df_sd) Coefficients: (Intercept) sum -1.050 -0.068
But I think this is one useful thing to do in this type of scenarios. Thanks everyone for the answers!