npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
kendallsTau.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_KENDALLSTAU_HH_
2 #define NPSTAT_KENDALLSTAU_HH_
3 
4 /*!
5 // \file kendallsTau.hh
6 //
7 // \brief Kendall's rank correlation coefficient (Kendall's tau)
8 //
9 // Calculation of the Kendall's tau measure of association of two
10 // variables. Here, tau can be estimated either from a sample of
11 // points or from an empirical copula.
12 //
13 // Author: I. Volobouev
14 //
15 // April 2012
16 */
17 
18 #include <vector>
19 
20 namespace npstat {
21  /**
22  // Estimate Kendall's tau from a sample of multivariate points.
23  // Class Point should be subscriptable.
24  */
25  template <class Point>
26  double sampleKendallsTau(const std::vector<Point>& data,
27  unsigned firstDim, unsigned secondDim);
28 
29  /**
30  // Estimate Kendall's tau from an empirical copula.
31  //
32  // In this function, the array should represent an empirical 2-d
33  // copula (constructed, for example, by the calculateEmpiricalCopula
34  // function -- see header file empiricalCopula.hh). Do not confuse it
35  // with the copula density.
36  */
37  template <class Array>
38  double kendallsTauFromCopula(const Array& copula);
39 }
40 
41 #include "npstat/stat/kendallsTau.icc"
42 
43 #endif // NPSTAT_KENDALLSTAU_HH_
Definition: AbsArrayProjector.hh:14
double kendallsTauFromCopula(const Array &copula)
double sampleKendallsTau(const std::vector< Point > &data, unsigned firstDim, unsigned secondDim)