Learn R Programming

copBasic (version 1.6.0)

rhoCOP: The Spearman's Rho of a Copula

Description

Compute the measure of association known as Spearman's Rho $\rho_\mathbf{C}$ of a copula according to Nelson (2006, pp. 167--170, 189, 208) by $$\rho_\mathbf{C} = 12\int_0^1 \int_0^1 \mathbf{C}(u,v)\, \mathrm{d}u\mathrm{d}v - 3\mbox{\ or}$$ $$\rho_\mathbf{C} = 12\int_0^1 \int_0^1 [\mathbf{C}(u,v) - uv]\, \mathrm{d}u\mathrm{d}v\mbox{,}$$ where the later equation is implemented by rhoCOP. The integral $$\int_0^1 \int_0^1 \mathbf{C}(u,v)\,\mathrm{d}u\mathrm{d}v\mbox{,}$$ represents the volume under the graph of the copula and over the unit square (Nelson, 2006, p. 170) and therefore $\rho_\mathbf{C}$ is simple a rescaled volume under the copula. The second equation for $\rho_\mathbf{C}$ expresses the average distance between the joint distribution and pure independence $\mathbf{\Pi} = uv$. Nelson (2006, pp. 175--176) observes that the following relation between $\rho_\mathbf{C}$ and $\tau_\mathbf{C}$ (tauCOP) exists $$-1 \le 3\tau - 2\rho \le 1\mbox{.}$$

Usage

rhoCOP(cop=NULL, para=NULL, brute=FALSE, delta=0.002, ...)

Arguments

cop
A copula function;
para
Vector of parameters or other data structure, if needed, to pass to the copula;
brute
Should brute force be used instead of two nested integrate() functions in Rto perform the double integration;
delta
The $\mathrm{d}u$ and $\mathrm{d}v$ for the brute force integration using brute; and
...
Additional arguments to pass.

Value

  • The value for $\rho_\mathbf{C}$ is returned.

References

Nelson, R.B., 2006, An introduction to copulas: New York, Springer, 269 p.

See Also

blomCOP, giniCOP, hoefCOP, tauCOP, wolfCOP

Examples

Run this code
rhoCOP(cop=PSP)             # 0.4784176
rhoCOP(cop=PSP, brute=TRUE) # 0.4684063
# CPU heavy example showing that the dual-integration (fast) results in
# a Spearman's Rho that mimics a sample version
dorho <- function(n) {
   uv <- simCOP(n=n, cop=PSP, ploton=FALSE, points=FALSE)
   return(cor(uv$U, uv$V, method="spearman"))
}
rhos <- replicate(100, dorho(1000))
rho.sample <- mean(rhos); print(rho.sample) # 0.472661
para <- list(cop1=PLACKETTcop,  cop2=PLACKETTcop,
             para1=0.00395,    para2=4.67, alpha=0.9392, beta=0.5699)
rhoCOP(cop=composite2COP, para=para) # -0.5924796

para <- list(cop1=PLACKETTcop,  cop2=PLACKETTcop,
             para1=0.14147,    para2=20.96, alpha=0.0411, beta=0.6873)
rhoCOP(cop=composite2COP, para=para) # 0.2818874

para <- list(cop1=PLACKETTcop,  cop2=PLACKETTcop,
             para1=0.10137,     para2=4492.87, alpha=0.0063, beta=0.0167)
rhoCOP(cop=composite2COP, para=para)             # 0.9812919
rhoCOP(cop=composite2COP, para=para, brute=TRUE) # 0.9752155

Run the code above in your browser using DataLab