# Linear trend for correlations

I am evaluating three independent samples (1-3). For each sample I have calculated a correlation of variables A and B.

I am now interested if there is a linear trend in the development of the correlations from sample 1 to sample 3. I have already detected that the correlations for the three samples are significantly different from one another.

For linear trend analyses I have only found ways, in which you can analyze the development of one variable over different samples, but not of the correlation of two variables over different samples.

Is there a way to calculate this?

UPDATE: I think I need to specify a little more: I have the data of 3 classes (3rd, 5th and 7th). The students have all been tested in the same tests. I am interested in the relation of the two variables AxB and therefore I have calculated the correlation for these two variables (for all three class-levels). For the 3rd grade the correlation is close to zero. For the 5th grade the correlation is somewhat higher but still very small and for the 7th grade the correlation is moderate. I have already detected that the correlations are significantly different from one another. I am now interested if the obvious change in the correlation is following a trend and I am trying to find a way to calculate this.

UPDATE 2: Unfortunately I cannot comment because I still need more reputation-points. Based on your question, what I am interested in is a way to find out, if the change of the relation of variable A and Variable B between groups/class levels (shown in significant different correlations from grade 3 to 7) is due to a linear change of variables A and B in between groups/class levels. I don't have any well-grounded theoretical base to assume which of both variables influences the other.

• Could you please explain what you mean by a "linear trend" in the correlations? A casual reader would understand it as a linear relationship between the correlation coefficient (or maybe its square?) and some other variable--but what other variable? Also, any such model (although possibly useful for limited purposes) would be inherently implausible, because projecting such trends would suggest correlations could fall beyond the bounds of $\pm 1$. Could you tell us the ultimate objective of your analysis? – whuber Jul 23 '15 at 18:15
• According to the update, you have nothing left to do: you have found significant differences among the correlations and the correlations increase with grade. Done! The hard part may be to connect this result with any meaningful question about the students (or tests) and to interpret what it means. – whuber Jul 23 '15 at 19:21
• I removed my answer until there is a little more clarity. Is the change in correlation truly what you are interested in? Two variables being more related after length of instruction is impossible to interpret. Do you want to know if the effect of B on A is stronger after instruction? Or do you want to know if length of instruction reduces noise in A and/or B? Or neither and you really only care about the correlation as a whole? – le_andrew Jul 23 '15 at 19:51
• Please register & merge your accounts (you can find out how in the My Account section of our help center), then you will be able to comment on & edit your own question. – gung - Reinstate Monica Jul 23 '15 at 20:37

If what you are interested in is whether the size of the relationship between A and B differs linearly across grade levels, this is equivalent to asking if there is a group by predictor variable interaction (if this is not what you are interested in, let me know so I can delete this answer permanently). More specifically, a linear-group-contrast by predictor variable interaction component. The GLM would be $$A_{ij}=\beta_0+\beta_1B_i+\beta_2G1_{j}+\beta_3G2_{j}+\beta_4B_iG1_{j}+\beta_5B_iG2_{j}+\epsilon_i$$ B is your predictor variable of interest. A is your criterion variable of interest. G1 and G2 are the linear and quadratic contrasts for your group assignment factor (e.g -1, 0, 1 for 3rd, 5th and 7th grade for a linear trend, and 1, -2, 1 for 3rd, 5th, and 7th grade for a quadratic trend). You are interested in whether $\beta_4$ is significant. If $\beta_4$ is significant, it means that the effect of your predictor variable on your criterion variable changes linearly from grade 3 to 5 to 7. If $\beta_5$ is significant, then your story is little more complex. The trend is not necessarily linear. Instead the trend itself changes as you go from group 1 to 2 to 3.
• That's right--but because changes in dispersion can cause changes in correlations, it is essential to accommodate that possibility in your model and your fitting procedure. It doesn't even handle the possibility of changing covariances (unless you implicitly assume the $\epsilon_i$ are not identically distributed). – whuber Jul 23 '15 at 19:18