[R] Test for equality of complicatedly related average correlations
Adam D. I. Kramer
adik-rhelp at ilovebacon.org
Sat Sep 6 23:02:49 CEST 2008
Hi Ralph,
I had the same problem you do a few months ago, and realized that
the question I had (does time show a different effect for X than Y) was not
best modeled as differences between correlations across individuals, but as
whether time interacts with condition.
I answered this question with
> library(nlme)
> lme(obs ~ cond*time, random=~cond*time|subj)
...where obs is the responses on the X or Y variable, cond is a factor of
either X or Y, and subj is your subject variable. This fits a heirarchical
linear model to the data. The relationship between X and time is sig. diff.
from the relationship between Y and time if the cond:time fixed effect is
true.
This approach makes better use of your data, because when you correlate the
observations, you're effectively "losing" variability (because correlations
are doubly standardized) as well as degrees of freedom (you have 9 df within
each individual, but each correlation is only one number).
--Adam
On Sat, 6 Sep 2008, Ralph79 wrote:
>
> Dear R-Users,
>
> I am currently looking for a way to test the equality of two correlations
> that are related in a very special way. Let me describe the situation with
> an example.
>
> - There are 100 respondents, and there are 2 points in time, t=1 and t=2.
>
> - For each of the respondents and at each of the time points, I have
> information on 10 X-variables and on 10 Y-variables.
>
> - Based on this information, I calculate two correlations for each
> respondent: cor(X[t=1],X[t=2]) and cor(Y[t=1],Y[t=2]), with X and Y being
> the vectors of the corresponding 10 variables.
>
> - Now I get the average correlations over the whole sample using Fishers
> Z-transformation, i.e. I have mean(cor(X[t=1],X[t=2])) and
> mean(cor(X[t=1],X[t=2])) and want to know if the mean correlations are
> significantly different!
>
>
> I haven't found any test that deals with exactly my situation. Therefore, I
> "simply" apply a paired t-test based on the individual z-correlations. From
> my point of view this should be ok, because of the z's normality. However, I
> am unsure if there is a better way to test the hypothesis that I am
> interested in?
>
> I'd be grateful for any comment or hint.
>
> Thank you very much,
>
> Ralph
>
> -----
> Ralph Wirth
> University Erlangen-Nuremberg, Chair of Statistics
> GfK Group, Department of Methods and Product Development
>
> --
> View this message in context: http://www.nabble.com/Test-for-equality-of-complicatedly-related-average-correlations-tp19346312p19346312.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list