ci.spear: Confidence interval for a Spearman correlation

View source: R/statpsych2.R

ci.spearR Documentation

Confidence interval for a Spearman correlation

Description

Computes a Fisher confidence interval for a population Spearman correlation.

Usage

ci.spear(alpha, y, x)

Arguments

alpha

alpha level for 1-alpha confidence

y

vector of y scores

x

vector of x scores (paired with y)

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimated Spearman correlation

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

\insertRef

Bonett2000statpsych

Examples

y <- c(21, 4, 9, 12, 35, 18, 10, 22, 24, 1, 6, 8, 13, 16, 19)
x <- c(67, 28, 30, 28, 52, 40, 25, 37, 44, 10, 14, 20, 28, 40, 51)
ci.spear(.05, y, x)

# Should return:
#  Estimate         SE        LL        UL
# 0.8699639 0.08241326 0.5840951 0.9638297
 


statpsych documentation built on Sept. 11, 2024, 7:42 p.m.