3
$\begingroup$

I have a data frame (df) where I see correlation between two continuous variables (c1 and c2). I need to know whether the observed correlation between the two variables differs between groups, which are identified with a categorical variable (v1)?

I tried to find interaction using lm function in R. I tried lm(c1~c2*v1,data=df) and looked for p value of the interaction c2:v1. I am not sure if this is correct. Please correct me if I am wrong.

$\endgroup$
0

1 Answer 1

1
$\begingroup$

I think you should implement a Sperman correlation (by group).

See this link, to another stackexchange.com question.

In alternative, see this other link, to another stackexchange.com question.

$\endgroup$
9
  • $\begingroup$ Thank you for those links. But I also need to know if the correlations obtained by factors are statistically different. Any comment on that? $\endgroup$
    – Veera
    Commented Jul 2, 2015 at 6:30
  • $\begingroup$ Doesn't R give you p-values as well? That's what you should look at. $\endgroup$
    – Fuca26
    Commented Jul 2, 2015 at 6:35
  • $\begingroup$ I meant if I get correlation in subset1 is 0.4 and subset2 is 0.6, I need to know if correlation in subset1 is statistically different from correlation in subset2. Hope you get me. $\endgroup$
    – Veera
    Commented Jul 2, 2015 at 6:37
  • $\begingroup$ Lets say I am looking for the correlation between the blood insulin and glucose levels in a group of participants. Suppose if i need to know how the correlation varies, if i group them in to diabetics and non-diabetics, what should I do. $\endgroup$
    – Veera
    Commented Jul 2, 2015 at 6:49
  • $\begingroup$ I have tried to clarify your question. Roll it back if you do not like it or distort the meaning of your initial question. $\endgroup$
    – Fuca26
    Commented Jul 2, 2015 at 6:51

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.