yat
0.14.5pre
|
Kendall's tau rank coefficient. More...
#include <yat/statistics/Kendall.h>
Public Member Functions | |
Kendall (void) | |
Constructor. | |
Kendall (const Kendall &other) | |
Copy constructor. | |
virtual | ~Kendall (void) |
Destructor. | |
void | add (double x, double y) |
add pair of data | |
size_t | n (void) const |
double | p_left (bool exact=false) const |
Lower one-sided p-value. More... | |
double | p_right (bool exact=false) const |
Upper one-sided p-value. More... | |
double | p_value (bool exact=false) const |
Two-sided p-value. | |
void | reset (void) |
reset | |
double | score (void) const |
Kendall's tau. More... | |
Kendall & | operator= (const Kendall &rhs) |
assignment operator | |
Kendall's tau rank coefficient.
size_t theplu::yat::statistics::Kendall::n | ( | void | ) | const |
double theplu::yat::statistics::Kendall::p_left | ( | bool | exact = false | ) | const |
double theplu::yat::statistics::Kendall::p_right | ( | bool | exact = false | ) | const |
Upper one-sided p-value.
If exact
function permutaes the data and counts fraction of permutations that result in a larger tau coefficient.
If not exact
a Gaussian approximation by transforming the score to a variable a z is approximately stardard normal, where
(see function score() for explanation of variables).
and p-value is calculates as
double theplu::yat::statistics::Kendall::score | ( | void | ) | const |
Kendall's tau.
where is number concordant pairs, number of disconcordant pairs, total number of pairs, number of data points in ties group i
, and number of data points in tied group j