This function provides three types of approximations of the distribution
function of Spearman's rho. Besides the two approximations
used in `cor.test(,method="spearman")`

, which are AS89 and the t-distribution,
this function allows to use precomputed null distribution for `n <= 22`

.
See `spearman.test`

for the details of the algorithm used to compute this
null distribution.

1 2 |

`s` |
The observed value of S statistics |

`n` |
The number of observations. |

`lower.tail` |
If TRUE (the default), the probability of |

`approximation` |
Selection of the method of approximation of the distribution function. |

See `spearman.test`

for more detail.

Depending on `lower.tail`

, either the probability of `S <= s`

or of `S >= s`

is computed, where S is the statistics
`sum((rank(x) - rank(y))^2)`

.

1 2 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.