Compute Kendall's Tau of an Ali-Mikhail-Haq ("AMH") or Joe Archimedean
copula with parameter theta
. In both cases, analytical
expressions are available, but need alternatives in some cases.
tauAMH()
:Analytically, given as
1 - 2((1-t)(1-t)log(1-t) + t)/(3*t^2),
for theta
=t;
numerically, care has to be taken when t -> 0,
avoiding accuracy loss already, for example, for t as
large as theta = 0.001
.
tauJoe()
:Analytically,
1- 4 sum{k=1:Inf; 1/(k(t*k+2)(t(k-1)+2))},
the infinite sum can be expressed by three ψ()
(psigamma
) function terms.
1 2 |
theta |
numeric vector with values in [-1,1] for AMH, or [0.238734, Inf) for Joe. |
method |
string specifying the method for |
noTerms |
the number of summation terms for the |
tauAMH()
:For small theta
(=θ), we use Taylor series
approximations of up to order 7,
tau[A](th) = 2*th/9 *(1 + th*(1/4 + th/10* (1 + th*(1/2 + th*2/7)))) + O(th^6),
where we found that dropping the last two terms (e.g., only using 5 terms from the k=7 term Taylor polynomial) is actually numerically advantageous.
tauJoe()
:The "sum"
method simply replaces the infinite sum by a finite
sum (with noTerms
terms. The more accurate or faster methods,
use analytical summation formulas, using the digamma
aka ψ function, see, e.g.,
http://en.wikipedia.org/wiki/Digamma_function#Series_formula.
The smallest sensible θ value, i.e., th
for which
tauJoe(th) == -1
is easily determined via
str(uniroot(function(th) tauJoe(th)-(-1), c(0.1, 0.3), tol = 1e-17), digits=12)
to be 0.2387339899
.
a vector of the same length as theta
(= θ), with
τ values
for tauAMH
: in [(5 - 8 log 2)/3, 1/3] ~= [-0.1817, 0.3333],
of
tau.A(t) = 1 - 2*((1-t)*(1-t)*log(1-t) + t) / (3*t^2),
numerically accurately, to at least around 12 decimal digits.
for tauJoe
: in [-1,1].
acopula-families
, and their class definition,
"acopula"
. etau()
for
method-of-moments estimators based on Kendall's tau.
1 2 3 4 5 6 7 |
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.