Learn R Programming

RVAideMemoire (version 0.9-45-2)

spearman.ci: Confidence interval of a Spearman's rank correlation coefficient

Description

Computes the confidence interval of a Spearman's rank correlation coefficient by bootstraping.

Usage

spearman.ci(var1, var2, nrep = 1000, conf.level = 0.95)

Arguments

var1
numeric vector (first variable).
var2
nuermic verctor (second variable).
nrep
number of replicates for bootstraping.
conf.level
confidence level of the interval.

Value

  • methodname of the test.
  • data.namea character string giving the name(s) of the data.
  • conf.levelconfidence level.
  • repnumber of replicates.
  • estimateSpearman's rank correlation coefficient.
  • conf.intconfidence interval.

See Also

cor.test, boot

Examples

Run this code
var1 <- sample(1:50,15,replace=TRUE)
var2 <- sample(1:50,15,replace=TRUE)
spearman.ci(var1,var2)

Run the code above in your browser using DataLab