isfuncCOP {copBasic}R Documentation

Is a General Bivariate Function a Copula by Gridded Search?

Description

Is a general bivariate function a copula? Three properties are identified by Nelsen (2006, p. 10) for a bivariate copula C(u,v)\mathbf{C}(u,v):

C(u,0)=0=C(0,v)\mboxNelsen2.2.2a,\mathbf{C}(u,0) = 0 = \mathbf{C}(0,v)\mbox{\quad Nelsen 2.2.2a,}

C(u,1)=u\mbox and C(1,v)=v\mboxNelsen2.2.2b,and\mathbf{C}(u,1) = u \mbox{\ and\ } \mathbf{C}(1,v) = v\mbox{\quad Nelsen 2.2.2b, and}

for every u1,u2,v1,v2u_1, u_2, v_1, v_2 in I2\mathcal{I}^2 such that u1u2u_1 \le u_2 and v1v2v_1 \le v_2,

C(u2,v2)C(u2,v1)C(u1,v2)+C(u1,v1)0\mboxNelsen2.2.2c.\mathbf{C}(u_2, v_2) - \mathbf{C}(u_2, v_1) - \mathbf{C}(u_1, v_2) + \mathbf{C}(u_1, v_1) \ge 0 \mbox{\quad Nelsen 2.2.2c.}

The last condition is known also as “2-increasing.” The isfuncCOP works along a gridded search in the domain I2=[0,1]×[0,1]\mathcal{I}^2 = [0,1]\times[0,1] for the 2-increasing check with a resolution Δu=Δv\Delta u = \Delta v == delta. Because there are plenty of true copula functions available in the literature it seems unlikely that this function provides much production utility in investigations. This function is provided because part of the objectives of the copBasic package is for instructional purposes. The computational overhead is far too great for relative benefit to somehow dispatch to this function all the time using the other copula utilities in this package.

Usage

isfuncCOP(cop=NULL, para=NULL, delta=0.002, ...)

Arguments

cop

A potential bivariate copula function that accepts two arguments for the uu and vv and parameters along argument para with option of additional arguments through the ... argument;

para

Vector of parameters or other data structure, if needed, to pass to the copula;

delta

The Δu=Δv\Delta u = \Delta v of the grid edges; and

...

Additional arguments to pass to the copula function.

Value

A logical value of TRUE or FALSE is returned.

Author(s)

S. Kloibhofer (idea and most code) and W.H. Asquith (documentation)

References

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

See Also

densityCOP

Examples

## Not run: 
"NelsenEx2.11" <- function(u,v, ...) { # Nelsen (2006, exer. 2.11, p. 16)
  if(length(u) > 1 & length(v) > 1 & length(u) != length(v)) return(NA)
  if(length(u) == 1) u <- rep(u, length(v))
  if(length(v) == 1) v <- rep(v, length(u))
  return(sapply(1:length(u), function(i) { upv <- u[i] + v[i]
                 if(2/3 <= upv & upv <= 4/3) return(min(c(u,v,1/3,upv-(2/3))))
                 max(u[i]+v[i]-1, 0) }))
}
isfuncCOP(cop=NelsenEx2.11) # FALSE
## End(Not run)

[Package copBasic version 2.2.4 Index]