We show examples for comparing the magnitude of two
rrm values. Correlations are compared using
the cocor package:
R package
Paper
Web Version
In the first example, we compare rrm
values from two distinct, independent datasets. That is, they do not
have the same participants. This is a nonsense example because the two
datasets are from completely different experimental designs that do not
share common measures.
Note the two
rrm values are similar in magnitude and
have large overlap in their confidence intervals:
rrm = -0.58, 95% CI [-0.74, -0.38] and
rrm = -0.40, 95% CI [-0.66, -0.07]. Thus,
they are not significantly different.
#1) Run rmcorr on two different datasets
<- rmcorr(Pair, HVT_capture, MARS, marusich2016_exp2)
model1.marusich2016_exp2 #> Warning in rmcorr(Pair, HVT_capture, MARS, marusich2016_exp2): 'Pair' coerced
#> into a factor
model1.marusich2016_exp2#>
#> Repeated measures correlation
#>
#> r
#> -0.5890471
#>
#> degrees of freedom
#> 55
#>
#> p-value
#> 1.434929e-06
#>
#> 95% confidence interval
#> -0.738878 -0.3837139
<- rmcorr(sub, rt, acc, gilden2010 )
model2.gilden2010 #> Warning in rmcorr(sub, rt, acc, gilden2010): 'sub' coerced into a factor
model2.gilden2010#>
#> Repeated measures correlation
#>
#> r
#> -0.406097
#>
#> degrees of freedom
#> 32
#>
#> p-value
#> 0.01716871
#>
#> 95% confidence interval
#> -0.6611673 -0.06687244
#2) Extract relevant parameters
#Model 1
<- model1.marusich2016_exp2$r
rmcorr1
rmcorr1#> [1] -0.5890471
<- model1.marusich2016_exp2$df + 2 #note the same kludge as power above
n1 #this is the effective sample size
n1 #> [1] 57
#Model 2
<- model2.gilden2010$r
rmcorr2
rmcorr2#> [1] -0.406097
<- model2.gilden2010$df + 2
n2
n2#> [1] 34
#3) Compare the two indendent rmcorr coefficients
cocor.indep.groups(rmcorr1, rmcorr2, n1, n2,
var.labels = c(model1.marusich2016_exp2$var[2:3],
$vars[2:3]))
model2.gilden2010#>
#> Results of a comparison of two correlations based on independent groups
#>
#> Comparison between r1.jk (HVT_capture, MARS) = -0.589 and r2.hm (rt, acc) = -0.4061
#> Difference: r1.jk - r2.hm = -0.183
#> Data: j = HVT_capture, k = MARS, h = rt, m = acc
#> Group sizes: n1 = 57, n2 = 34
#> Null hypothesis: r1.jk is equal to r2.hm
#> Alternative hypothesis: r1.jk is not equal to r2.hm (two-sided)
#> Alpha: 0.05
#>
#> fisher1925: Fisher's z (1925)
#> z = -1.0885, p-value = 0.2764
#> Null hypothesis retained
#>
#> zou2007: Zou's (2007) confidence interval
#> 95% confidence interval for r1.jk - r2.hm: -0.5420 0.1365
#> Null hypothesis retained (Interval includes 0)