cor.diff.test | R Documentation |
Given two sets of correlation coefficients and sample sizes, this function calculates and returns the z-scores and p-values associated with the difference between correlation coefficients.
cor.diff.test(r1, r2, n, alternative = c("two.sided", "less", "greater"))
r1 , r2 |
Numeric (vector or matrix) of correlation coefficients for both groups |
n |
Integer vector; number of observations for both groups |
alternative |
Character string, whether to do a two- or one-sided test.
Default: |
A list with elements p
and z
, the p-values
and z-scores for the difference in correlations.
Christopher G. Watson, cgwatson@bu.edu
## Not run:
kNumSubjs <- summary(covars$Group)
corr.diffs <- cor.diff.test(corrs$R[, , 1], corrs$R[, , 2], kNumSubjs)
edge.diffs <- t(sapply(which(corr.diffs$p < .05), function(x)
mapply('[[',
dimnames(corr.diffs$p),
arrayInd(x, dim(corr.diffs$p)))
))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.