Learn R Programming

copBasic (version 2.1.4)

glueCOP: The Gluing Two Copulas

Description

The gluing copula technique (Erdely, 2017, p. 71), given two bivariate copulas \(\mathbf{C}_A\) and \(\mathbf{C}_B\) and a fixed value \(0 \le \gamma \le 1\) is $$\mathbf{C}_{A,B\gamma}(u,v) = \gamma\mathbf{C}_A(u/\gamma, v)$$ for \(0 \le u \le \gamma\) and $$\mathbf{C}_{A,B\gamma}(u,v) = (1-\gamma)\mathbf{C}_B((u-\gamma)/(1-\gamma), v)$$ for \(\gamma \le u \le 1\) and \(\gamma\) represents the gluing point. The logic is simply the rescaling of \(\mathbf{C}_A\) to \([0,\gamma] \times [0,1]\) and \(\mathbf{C}_B\) to \([\gamma,1] \times [0,1]\). Copula gluing is potentially useful in circumstances for which regression is non-monotone.

Usage

glueCOP(u, v, para=NULL, ...)

Arguments

u

Nonexceedance probability \(u\) in the \(X\) direction;

v

Nonexceedance probability \(v\) in the \(Y\) direction;

para

A special parameter list (see Note) with a mandatory element of glue parameter \(\gamma\); and

...

Additional arguments to pass to the copulas.

Value

Value(s) for the copula are returned.

References

Erdely, A., 2017, Copula-based piecewise regression (chap. 5) in Copulas and dependence models with applications---Contributions in honor of Roger B. Nelsen, eds. Flores, U.M., Amo Artero, E., Durante, F., S<U+00E1>nchez, J.F.: Springer, Cham, Switzerland, ISBN 978--3--319--64220--9.

See Also

composite1COP, composite2COP, composite3COP, convexCOP

Examples

Run this code
# NOT RUN {
para <- list(cop1=PLACKETTcop, para1=.2, cop2=GLcop, para2=1.2)
densityCOPplot(cop=glueCOP, para=para, glue=0.6) # 
# }
# NOT RUN {
# }
# NOT RUN {
# Concerning Nelsen (2006, exer. 3.3, pp. NN)
# Concerning Erdely (2017, exam. 5.1, p. 71)
# Concerning Erdely (2017, exam. 5.2, p. 75
# Nelsen's example is a triangle with vertex at [P,1].
# Erdley's example permits the construction using glueCOP from M and W.
"coptri" <- function(u,v, para=NA, ...) {
   p <- para[1]; r <- 1 - (1-p)*v
   if(length(u) > 1 | length(v) > 1) stop("only scalars for this function")
   if(0 <= u & u <= p*v & p*v <= p) {            return(u)
   } else if(  0 <= p*v & p*v <  u & u <  r) {   return(p*v)
   } else if(  p <= r   & r   <= u & u <= 1 ) {  return(u+v-1)
   } else { stop("should not be here in logic") }
}
"UsersCop" <- function(u,v, ...) { asCOP(u,v, f=coptri, ...) }
para <- list(cop1=M, cop2=W, para1=NA, para2=NA, glue=0.35)
UV <- simCOP(cop=UsersCop, para=0.35, cex=0.5, pch=16)
UV <- simCOP(cop=glueCOP,  para=para, col=2,   ploton=FALSE)
# We see in the plot that the triangular copulas are the same.
# For P = 0.5, Erdley shows Spearman Rho = 2*P-1 = 0, but
#  Schweizer-Wolff = P^2 + (P-1)^2 = 0.5, let us check these:
rhoCOP( cop=glueCOP, para=para, glue=0.5) # -2.181726e-17
wolfCOP(cop=glueCOP, para=para, glue=0.5) #  0.4999953
# So rhoCOP() indicates independence, but wolfCOP() indicates
# dependence at the minimum value possible for a triangular copula. 
# }

Run the code above in your browser using DataLab