Learn R Programming

copBasic (version 1.5.1)

rhoCOP: The Spearman's Rho of a Copula

Description

Compute the Spearman's Rho $\rho_\mathbf{C}$ of a copula according to Nelson (2006) by $$\rho_\mathbf{C} = 12\int_0^1 \int_0^1 [\mathbf{C}(u,v) - uv] \mathrm{d}u\mathrm{d}v\mbox{,}$$ $$\rho_\mathbf{C} = 12\int_0^1\int_0^1 uv \frac{\delta\mathbf{C}(u,v)}{\delta u} \frac{\delta\mathbf{C}(u,v)}{\delta v} \mathrm{d}u\mathrm{d}v - 3\mbox{, or }$$ $$\rho_\mathbf{C} = 12\int_0^1 \int_0^1 \mathbf{C}(u,v) \mathrm{d}u\mathrm{d}v - 3\mbox{.}$$

Usage

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

Arguments

cop
A copula function;
para
Vector of parameters or other data structure, if needed, to pass to the copula;
byloops
Should brute force nested for loops be used instead of two integrate functions to perform the double integration;
delta
The $\mathrm{d}u$ and $\mathrm{d}v$ for the integration; 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

tauCOP

Examples

Run this code
Rho <- rhoCOP(cop=PSP, para=NULL)
print(Rho)


para <- list(cop1=PLACKETTcop,  cop2=PLACKETTcop,
             para1=c(0.00395),  para2=c(4.67),
             alpha=0.9392,      beta=0.5699)
Rho <- rhoCOP(cop=composite2COP, para=para)
print(Rho)


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

para <- list(cop1=PLACKETTcop,  cop2=PLACKETTcop,
             para1=c(0.10137),  para2=c(4492.87),
             alpha=0.0063,      beta=0.0167)
Rho <- rhoCOP(cop=composite2COP, para=para)
print(Rho)

Run the code above in your browser using DataLab