tau_a_p: Tabulate tau and p-values for a given length and number of...

Description Usage Arguments Value Examples

View source: R/tau-a-p.R

Description

Tabulate tau and p-values for a given length and number of inversions.

Usage

1
2
3
4
5
6
7
8
9
tau_a_p(
  n,
  k = floor((choose(n, 2)/2)):0,
  sided = 1,
  tau.fn = stats::cor.test,
  tau.part = "estimate",
  p.part = "p.value",
  ...
)

Arguments

n

A positive integer.

k

A vector of nonnegative integers at most n.

sided

Number of sides to a test; either 1 or 0.

tau.fn

A function that computes elements tau and p-value from a pair of vectors.

tau.part

The name of the tau element of the value of tau.fn.

p.part

The name of the p-value element of the value of tau.fn.

...

Additional parameters passed to tau.fn.

Value

For each entry of k, the corresponding value of tau and associated p-value.

Examples

1
2
3
tau_a_p(5, 0:5, sided = 1)
tau_a_p(5, 5:10, sided = 1)
tau_a_p(5, 0:5, tau.fn = Kendall::Kendall, tau.part = "tau", p.part = "sl")

corybrunson/tautable documentation built on March 29, 2021, 9:22 p.m.