| Tcop | R Documentation |
The t-Student copula (Salvadori et al., 2007, pp. 255–256) is
\mathbf{C}_{\Theta,\nu}(u,v) = \mathbf{T}(u,v; \Theta,\nu) =
\int_{-\infty}^{t_\nu^{(-1)}(u)}\!\!\!\!\int_{-\infty}^{t_\nu^{(-1)}(v)}\!\!\!\!\!\!
\frac{1}{2\pi\sqrt{1-\Theta^2}}
\mathrm{exp}\biggl(-\frac{s^2 - 2\Theta s t + t^2}{ \nu(1-\Theta^2) } \biggr)^{-(\nu+2)/2}\!\!\!\!\mathrm{d}s\,\mathrm{d}t\mbox{,}
where \Theta \in [-1,1], \nu \ge 1 (integer), and t_\nu^{(-1)}(x) is the quantile function of the univariate t-distribution. The copula, as \Theta \rightarrow -1^{+}, limits to the countermonotonicity copula (\mathbf{W}(u,v); W), as \Theta \rightarrow 0 limits, to the independence coupla (\mathbf{P}(u,v) if \nu becomes large; P), and as \Theta \rightarrow 1^{-}, limits to the comonotonicity copula (\mathbf{M}(u,v); M). The copula has lower-tail dependency and upper-tail dependency parameters that are nonzero if \Theta > 0 and both parameters equal to
\lambda_{L|U} = 2t_{\nu+1}\biggl(-\frac{\sqrt{\nu+1}\sqrt{1-\Theta}}{\sqrt{1+\Theta}}\biggr)\mathrm{,}
which tend to zero as \nu \rightarrow \infty, which are those for the Normal copula (NORMcop). The Spearman Rho (rhoCOP) is \rho_\mathbf{C} = (6/\pi)\cdot\mathrm{asin}(\Theta/2) and Kendall Tau (tauCOP) is \tau_\mathbf{C} = (2/\pi)\cdot\mathrm{asin}(\Theta) and are the same as for NORMcop. The parameter \Theta is readily computed by \Theta = 2\cdot\mathrm{sin}(\pi\cdot\rho_\mathbf{C}/6) or by \Theta = \mathrm{sin}(\pi\cdot\tau_\mathbf{C}/2).
Tcop(u, v, para=NULL, rho=NULL, tau=NULL, taildep=NULL, fit=c("rho", "tau"), ...)
u |
Nonexceedance probability |
v |
Nonexceedance probability |
para |
A vector (two element) of parameters— |
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; |
taildep |
Optional lower/upper tail dependency coefficient to try to fit the parameters for the give |
fit |
If |
... |
Additional arguments to pass. |
Value(s) for the copula are returned. Otherwise if either rho or tau is given, then the \Theta and \nu are computed and a list having
para |
The parameters |
rho |
Spearman Rho if the |
tau |
Kendall Tau if the |
lambdaUL |
Computed tail dependency (if computable); |
message |
Helpful message; |
lambdaUL_if_nu_were_eqone |
Computed tail dependency if |
and if para=NULL and rho and tau=NULL, then the values within u and v are used to compute Spearman Rho (fit="rho") or Kendall Tau (fit="tau") and then compute the \Theta and then attempt to compute the \nu from the taildep, and these are returned in the aforementioned list.
A mimic of the wrappers on mvtnorm::pmvt() from the copula package (v1.1-6) are made within Tcop. The rest of the implementation is unique to copBasic. An implementation of a function in the copBasic style that would natively interconnect to copula package version of the copula could be as follows:
"Tcop" <- # pCoupla() from package copula is analogous to COP()
function(u,v, para=NULL) {
if(length(u) == 1) u <- rep(u, length(v)) # see asCOP() for reasoning of
if(length(v) == 1) v <- rep(v, length(u)) # this "vectorization" hack
para <- copula::tCopula(c(para[1]), dim=2, df=as.integer(para[2]))
return( copula::pCopula(matrix(c(u,v), ncol=2), para) )
}
W.H. Asquith
Salvadori, G., De Michele, C., Kottegoda, N.T., and Rosso, R., 2007, Extremes in Nature—An approach using copulas: Springer, 289 p.
NORMcop
## Not run:
para <- Tcop(para=NULL, rho=0.9, taildep=0.3) # 0.907981 22.000000
UV <- simCOP(1000, cop=Tcop, para=para$para) # see the tail dependency
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.