Learn R Programming

RVAideMemoire (version 0.9-54)

spearman.cor.multcomp: Comparison of several Spearman's rank correlation coefficients

Description

Computes Bonferroni-adjusted confidence intervals of a series of Spearman's rank correlation coefficients, for multiple comparisons. Confidence intervals are computed by bootstraping.

Usage

spearman.cor.multcomp(var1, var2, fact, alpha = 0.05, nrep = 1000)

Arguments

var1
numeric vector (first variable).
var2
numeric vector (second variable).
fact
factor (groups).
alpha
significance level.
nrep
number of replicates for bootstraping.

Value

  • methodname of the test.
  • data.namea character string giving the name(s) of the data.
  • tabdata frame of correlation coefficients with confidence intervals
  • alphasignificance level.
  • nrepnumber of replicates for bootstraping.

Details

Confidence intervals which do not overlap indicate correlation coefficients significantly different at alpha.

See Also

spearman.ci

Examples

Run this code
set.seed(1510)
var1 <- c(1:15+rnorm(15,0,2),1:15+rnorm(15,0,2),1:15+rnorm(15,0,2))
var2 <- c(-1:-15+rnorm(15,0,2),1:15+rnorm(15,0,2),1:15+rnorm(15,0,2))
fact <- gl(3,15,labels=LETTERS[1:3])
spearman.cor.multcomp(var1,var2,fact)
# B and C similar but different from A

Run the code above in your browser using DataLab