Learn R Programming

fmsb (version 0.7.6)

spearman.ci.sas: Calculate Spearman's rank correlation with its confidence intervals by SAS method

Description

Calculate Spearman's rank correlation with its confidence intervals by the same method as SAS. Since fmsb-0.7.3, missing values are excluded pairwisely before calculation.

Usage

spearman.ci.sas(x, y, adj.bias=TRUE, conf.level=0.95)

Value

rho

Calculated point estimate of Spearman's rank correlation coefficient.

rho.ll

The lower limit of given confidence intervals.

rho.ul

The upper limit of given confidence intervals.

adj.bias

The option for bias adjustment taken.

Arguments

x

A numeric vector.

y

A numeric vector.

adj.bias

Logical. If TRUE, adjustment for bias is taken. Default TRUE.

conf.level

Probability for confidence intervals. Default is 0.95.

References

https://support.sas.com/documentation/cdl/en/procstat/63104/HTML/default/viewer.htm#corr_toc.htm

Examples

Run this code
 data(airquality)
 spearman.ci.sas(airquality$Ozone, airquality$Wind)

Run the code above in your browser using DataLab