AMHcop | R Documentation |
The Ali–Mikhail–Haq copula (Nelsen, 2006, p. 92–93, 172) is
\mathbf{C}_{\Theta}(u,v) = \mathbf{AMH}(u,v) = \frac{uv}{1 - \Theta(1-u)(1-v)}\mbox{,}
where \Theta \in [-1,+1)
, where the right boundary,
\Theta = 1
, can sometimes be considered valid according to Mächler (2014). The copula \Theta \rightarrow 0
becomes the independence copula (\mathbf{\Pi}(u,v)
; P
), and the parameter \Theta
is readily computed from a Kendall Tau (tauCOP
) by
\tau_\mathbf{C} = \frac{3\Theta - 2}{3\Theta} -
\frac{2(1-\Theta)^2\log(1-\Theta)}{3\Theta^2}\mbox{,}
and by Spearman Rho (rhoCOP
), through Mächler (2014), by
\rho_\mathbf{C} = \sum_{k=1}^\infty \frac{3\Theta^k}{{k + 2 \choose 2}^2}\mbox{.}
The support of \tau_\mathbf{C}
is [(5 - 8\log(2))/3, 1/3]
\approx
[-0.1817258, 0.3333333]
and the \rho_\mathbf{C}
is [33 - 48\log(2), 4\pi^2 - 39]
\approx
[-0.2710647, 0.4784176]
, which shows that this copula has a limited range of dependency. The infinite summation is easier to work with than
Nelsen (2006, p. 172) definition of
\rho_\mathbf{C} = \frac{12(1+\Theta)}{\Theta^2}\mathrm{dilog}(1-\Theta)-
\frac{24(1-\Theta)}{\Theta^2}\log(1-\Theta)-
\frac{3(\Theta+12)}{\Theta}\mbox{,}
where the \mathrm{dilog(x)}
is the dilogarithm function defined by
\mathrm{dilog}(x) = \int_1^x \frac{\log(t)}{1-t}\,\mathrm{d}t\mbox{.}
The integral version has more nuances with approaches toward \Theta = 0
and \Theta = 1
than the infinite sum version.
AMHcop(u, v, para=NULL, rho=NULL, tau=NULL, fit=c("rho", "tau"), ...)
u |
Nonexceedance probability |
v |
Nonexceedance probability |
para |
A vector (single element) of parameters—the |
rho |
Optional Spearman Rho from which the parameter will be estimated and presence of |
tau |
Optional Kendall Tau from which the parameter will be estimated; |
fit |
If |
... |
Additional arguments to pass. |
Value(s) for the copula are returned. Otherwise if tau
is given, then the \Theta
is computed and a list
having
para |
The parameter |
tau |
Kendall Tau. |
and if para=NULL
and tau=NULL
, then the values within u
and v
are used to compute Kendall Tau and then compute the parameter, and these are returned in the aforementioned list.
Mächler (2014) reports on accurate computation of \tau_\mathbf{C}
and \rho_\mathbf{C}
for this copula for conditions of \Theta \rightarrow 0
and in particular derives the following equation, which does not have \Theta
in the denominator:
\rho_\mathbf{C} = \sum_{k=1}^{\infty} \frac{3\Theta^k}{{k+2 \choose 2}^2}\mbox{.}
The copula package provides a Taylor series expansion for \tau_\mathbf{C}
for small \Theta
in the copula::tauAMH()
. This is demonstrated here between the implementation of \tau = 0
for parameter estimation in the copBasic package to that in the more sophisticated implementation in the copula package.
copula::tauAMH(AMHcop(tau=0)$para) # theta = -2.313076e-07
It is seen that the numerical approaches yield quite similar results for small \tau_\mathbf{C}
, and finally, a comparison to the \rho_\mathbf{C}
is informative:
rhoCOP(AMHcop, para=1E-9) # 3.333333e-10 (two nested integrations) copula:::.rhoAmhCopula(1E-9) # 3.333333e-10 (cutoff based) theta <- seq(-1,1, by=.0001) RHOa <- sapply(theta, function(t) rhoCOP(AMHcop, para=t)) RHOb <- sapply(theta, function(t) copula:::.rhoAmhCopula(t)) plot(10^theta, RHOa-RHOb, type="l", col=2)
The plot shows that the apparent differences are less than 1 part in 100 million—The copBasic computation is radically slower though, but rhoCOP
was designed for generality of copula family.
W.H. Asquith
Joe, H., 2014, Dependence modeling with copulas: Boca Raton, CRC Press, 462 p.
Mächler, Martin, 2014, Spearman's Rho for the AMH copula—A beautiful formula: copula package vignette, accessed on April 7, 2018, at https://CRAN.R-project.org/package=copula under the vignette rhoAMH-dilog.pdf.
Nelsen, R.B., 2006, An introduction to copulas: New York, Springer, 269 p.
Pranesh, Kumar, 2010, Probability distributions and estimation of Ali–Mikhail–Haq copula: Applied Mathematical Sciences, v. 4, no. 14, p. 657–666.
P
## Not run:
t <- 0.9 # The Theta of the copula and we will compute Spearman Rho.
di <- integrate(function(t) log(t)/(1-t), lower=1, upper=(1-t))$value
A <- di*(1+t) - 2*log(1-t) + 2*t*log(1-t) - 3*t # Nelsen (2007, p. 172)
rho <- 12*A/t^2 - 3 # 0.4070369
rhoCOP(AMHcop, para=t) # 0.4070369
sum(sapply(1:100, function(k) 3*t^k/choose(k+2, 2)^2)) # Machler (2014)
# 0.4070369 (see Note section, very many tens of terms are needed)
## End(Not run)
## Not run:
layout(matrix(1:2, byrow=TRUE)) # Note: Kendall Tau is same on reversal.
s <- 2; set.seed(s); nsim <- 10000
UVn <- simCOP(nsim, cop=AMHcop, para=c(-0.9, "FALSE" ), col=4)
mtext("Normal definition [default]") # '2nd' parameter could be skipped
set.seed(s) # seed used to keep Rho/Tau inside attainable limits
UVr <- simCOP(nsim, cop=AMHcop, para=c(-0.9, "TRUE"), col=2)
mtext("Reversed definition")
AMHcop(UVn[,1], UVn[,2], fit="rho")$rho # -0.2581653
AMHcop(UVr[,1], UVr[,2], fit="rho")$rho # -0.2570689
rhoCOP(cop=AMHcop, para=-0.9) # -0.2483124
AMHcop(UVn[,1], UVn[,2], fit="tau")$tau # -0.1731904
AMHcop(UVr[,1], UVr[,2], fit="tau")$tau # -0.1724820
tauCOP(cop=AMHcop, para=-0.9) # -0.1663313
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.