Learn R Programming

RVAideMemoire (version 0.9-6)

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

Description

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

Usage

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

Arguments

var1
numeric vector (first variable).
var2
nuermic verctor (second variable).
rep
number of replicates for bootstrap.
conf.level
confidence level.

Value

  • conf.levelconfidence level.
  • repnumber of replicates.
  • coeffSpearman's rank correlation coefficient.
  • intervalconfidence 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