Skip to contents

Spearman rank correlation

Usage

spearman_correlation(x, y, confidence = 0.95)

Arguments

x, y

Numeric vectors.

confidence

Confidence level.

Value

An object of class "morie_test_result".

Examples

set.seed(1)
x <- rnorm(30)
spearman_correlation(x, x + rnorm(30))
#> Spearman correlation
#> --------------------
#>   statistic = 0.687653
#>   p-value   = 4.26525e-05
#>   df        = 28
#>   estimate  = 0.687653
#>   effect    = 0.472867
#>   CI        = [0.4352, 0.839856]
#>   n         = 30