isCOP.PQD: The Positively Quadrant Dependency State of a Copula

isCOP.PQDR Documentation

The Positively Quadrant Dependency State of a Copula

Description

Numerically determine the global property of the positively quadrant dependency (PQD) characteristic of a copula as described by Nelsen (2006, p. 188). The random variables X and Y are PQD if for all (x,y) in \mathcal{R}^2 when H(x,y) \ge F(x)G(x) for all (x,y) in \mathcal{R}^2 and thus by the copula \mathbf{C}(u,v) \ge uv for all (u,v) in \mathcal{I}^2. Alternatively, this means that \mathbf{C}(u,v) \ge \mathbf{\Pi}, and thus it can be said that it is globally “greater” than independence (uv = \Pi; P).

Nelsen (2006) shows that a copula is PQD when

0 \le \beta_\mathbf{C} \mbox{,\ } 0 \le \gamma_\mathbf{C}\mbox{,\ and\ } 0 \le \rho_\mathbf{C} \le 3\tau_\mathbf{C}\mbox{,}

where \beta_\mathbf{C}, \gamma_\mathbf{C}, \rho_\mathbf{C}, and \tau_\mathbf{C} are various copula measures of association or concordance that are respectively described in blomCOP, giniCOP, rhoCOP, and tauCOP. The concept of negatively quadrant dependency (NQD) is the reverse: \mathbf{C}(u,v) \le \mathbf{\Pi} for all (u,v) in \mathcal{I}^2; so NQD is globally “smaller” than independence.

Conceptually, PQD is related to the probability that two random variables are simultaneously small (or simultaneously large) is at least as great as it would be if they were independent. The graph of a PQD copula lies on or above the copulatic surface of the independence copula \mathbf{\Pi}, and conversely a NQD copula lies on or below \mathbf{\Pi}.

Albeit a “global” property of a copula, there can be “local” variations in the PQD/NQD state. Points in \mathcal{I}^2 where \mathbf{C}(u,v) - \mathbf{\Pi} \ge 0 are locally PQD, whereas points in \mathcal{I}^2 where \mathbf{C}(u,v) - \mathbf{\Pi} \le 0 and locally NQD. Lastly, readers are directed to the last examples in wolfCOP because as those examples involve the copulatic difference from independence \mathbf{C}(u,v) - \mathbf{\Pi} = \mathbf{C}(u,v) - \mathbf{\Pi} with 3-D renderings.

Usage

isCOP.PQD(cop=NULL, para=NULL, uv=NULL, empirical=FALSE, verbose=TRUE, ...)

Arguments

cop

A copula function;

para

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

uv

An optional R data.frame of U and V nonexceedance probabilities u and v for the random variables X and Y. This argument triggers different value return behavior (see Value);

empirical

A logical that will use sample versions for Gini Gamma, Spearman Rho, and Kendall Tau. This feature is only applicable if the copula is empirical and therefore the para argument is the data.frame of u and v, which will be passed along to sample version functions instead of copula (see Note);

verbose

A logical that will report the four concordance measures; and

...

Additional arguments to pass, which are then passed to subordinate functions.

Value

If uv=NULL then a logical for the global property of PQD is returned but if argument uv is a data.frame, then an R list is returned, and that list holds the global condition in global.PQD and local condition assessments in local.PQD and local.NQD.

Note

The function isCOP.PQD will try brute force computations if subordinate calls to one or more functions fails. The user can use ... to set the delta argument for giniCOP, rhoCOP, and (or) tauCOP.

This function is not guaranteed to work using a bivariate empirical copula such as the following operation: copPQD(cop=EMPIRcop, para=the.data). An evidently open problem for copBasic is how to support PQD assessment (either globally or locally) for empirical copulas. The \tau_\mathbf{C} for the bivariate empirical copula example brute=TRUE|FALSE to unity and \gamma_\mathbf{C} and \rho_\mathbf{C} reach maximum number of subdivisions on the numerical integration and thus fail. If an empirical bivariate copula is “Tau'd” to itself, is \tau_\mathbf{C} \equiv 1 guaranteed? The \tau_\mathbf{C} computation relies on numerical partial derivatives of the copula, whereas the \gamma_\mathbf{C} and \rho_\mathbf{C} use the copula itself. It seems in the end that use of sample versions of \gamma_\mathbf{C}, \rho_\mathbf{C}, and \tau_\mathbf{C} would be appropriate and leave the \beta_\mathbf{C} as either copula or direct sample computation (see Examples).

SPECIAL DEMONSTRATION 1—Given the following,

  para <- list(cop1=PLACKETTcop, cop2=PLACKETTcop, para1=c(14.5),para2=c(1.45),
               alpha=0.51, beta=0.15, kappa=0.45, gamma=0.78)
  D <- simCOP(n=500, cop=composite3COP, para=para, cex=0.5, col=1, pch=16)

the two different call types to isCOP.PQD for an empirical copula are illustrative:

  global.only <- isCOP.PQD(cop=EMPIRcop, para=D, empirical=TRUE)

and

  PQD.list <- isCOP.PQD(cop=EMPIRcop, para=D, empirical=TRUE, uv=D)
  points(D, col=PQD.list$local.PQD+2, lwd=2) # red (if present) is local NQD

which in the former only returns the global PQD and the later returns an R list with global (global.PQD), local (local.PQD as well as local.NQD), and the four statistics (beta \beta_\mathbf{C}, gamma \gamma_\mathbf{C}, rho \rho_\mathbf{C}, tau \tau_\mathbf{C}) used to determine global PQD.

SPECIAL DEMONSTRATION 1—Lastly, the ctype="bernstein" argument to the empirical copula can be used. Repeated iterations of the following will show that local quadrant dependency can appear slightly different when the bernstein argument is present. The simulation sample size is reduced considerably for this second example because of the CPU effort triggered by the Bernstein extension (see EMPIRcop) having been turned on.

  para <- list(cop1=PLACKETTcop,  cop2=PLACKETTcop, para1=14.5, para2=1.45,
               alpha=0.51, beta=0.15, kappa=0.45, gamma=0.78)
  D <- simCOP(n=50, cop=composite3COP, para=para, cex=0.5, col=1, pch=16)
  PQD.A<- isCOP.PQD(cop=EMPIRcop, para=D, empirical=TRUE, uv=D)
  points(D, col=PQD.A$local.PQD+2, lwd=2) # red (if present) is local NQD
  PQD.B<- isCOP.PQD(cop=EMPIRcop,para=D,empirical=TRUE,uv=D,ctype="bernstein")
  points(D, col=PQD.B$local.PQD+2, lwd=1, pch=3, cex=1.5)

Author(s)

W.H. Asquith

References

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

See Also

blomCOP, giniCOP, rhoCOP, tauCOP, isCOP.LTD, isCOP.RTI

Examples

## Not run: 
isCOP.PQD(cop=PSP) # TRUE
## End(Not run)

## Not run: 
# Example concerning Empirical Bivariate Copula and sample versions for comparison.
set.seed(10); n <- 1000
para <- list(cop1=PLACKETTcop, cop2=PLACKETTcop, para1=0.145,  para2=1.45,
             alpha=0.81, beta=0.8)
D <- simCOP(n=n, cop=composite2COP, para=para, cex=0.5, col=rgb(0,0,0,0.2), pch=16)
#tauCOP(cop=EMPIRcop, para=D)   # ??? but == 1
cor(D$U, D$V, method="kendall") # -0.3224705
blomCOP(cop=EMPIRcop, para=D)   # -0.332
giniCOP(cop=EMPIRcop, para=D)   # -0.3692037
GINI <- sum(abs(rank(D$U)+rank(D$V)-n-1)) - sum(abs(rank(D$U)-rank(D$V)))
print(GINI/as.integer(n^2/2))   # -0.369996
rhoCOP(cop=EMPIRcop, para=D)    # ??? but fails
cor(D$U, D$V, method="spearman")      # -0.456694
lmomco::lcomoms2(D)$T2     #  1.0000000 -0.4568357
                           # -0.4567859  1.0000000
## End(Not run)

wasquith/copBasic documentation built on Dec. 13, 2024, 6:39 p.m.