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-\frac{2((1-\theta)^2\log(1-\theta) + \theta)}{3\theta^2},$$
for theta\(=\theta\);
numerically, care has to be taken when \(\theta \to 0\),
avoiding accuracy loss already, for example, for \(\theta\) as
large as theta = 0.001.
tauJoe():Analytically,
$$1- 4\sum_{k=1}^\infty\frac{1}{k(\theta k+2)(\theta(k-1)+2)},$$
the infinite sum can be expressed by three \(\psi()\)
(psigamma) function terms.
tauAMH(theta)
tauJoe(theta, method = c("hybrid", "digamma", "sum"), noTerms=446)a vector of the same length as theta (\(= \theta\)), with
\(\tau\) values
for tauAMH: in \([(5 - 8 log 2)/3, 1/3] ~= [-0.1817, 0.3333]\),
of \(\tau_A(\theta) = 1 -
2(\theta+(1-\theta)^2\log(1-\theta))/(3\theta^2)\),
numerically accurately, to at least around 12 decimal digits.
for tauJoe: in [-1,1].
numeric vector with values in \([-1,1]\) for AMH, or \([0.238734, Inf)\) for Joe.
string specifying the method for tauJoe(). Use the
default, unless for research about the method. Up to copula
version 0.999-0, the only (implicit) method was "sum".
the number of summation terms for the "sum"
method; its default, 446 gives an absolute error smaller
than \(10^{-5}\).
tauAMH():For small theta (\(=\theta\)), we use Taylor series
approximations of up to order 7,
$$\tau_A(\theta) = \frac{2}{9}\theta\Bigl(1 + \theta\Bigl(\frac 1 4 +
\frac{\theta}{10}\Bigl(1 + \theta\Bigl(\frac 1 2 + \theta \frac 2
7\Bigr) \Bigr)\Bigr)\Bigr) + O(\theta^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 \(\psi\) function, see, e.g.,
https://en.wikipedia.org/wiki/Digamma_function#Series_formula.
The smallest sensible \(\theta\) 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.
acopula-families, and their class definition,
"acopula". etau() for
method-of-moments estimators based on Kendall's tau.
tauAMH(c(0, 2^-40, 2^-20))
curve(tauAMH, 0, 1)
curve(tauAMH, -1, 1)# negative taus as well
curve(tauAMH, 1e-12, 1, log="xy") # linear, tau ~= 2/9*theta in the limit
curve(tauJoe, 1, 10)
curve(tauJoe, 0.2387, 10)# negative taus (*not* valid for Joe: no 2-monotone psi()!)
Run the code above in your browser using DataLab