glueCOP | R Documentation |
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}_{\gamma}(u,v) = \gamma\cdot\mathbf{C}_A(u/\gamma, v)
for 0 \le u \le \gamma
and
\mathbf{C}_{\gamma}(u,v) = (1-\gamma)\cdot\mathbf{C}_B((u-\gamma)
\,/\,(1-\gamma), v)
for \gamma \le u \le 1
and \gamma
represents the gluing point in u
(horizontal axis). 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.
glueCOP(u, v, para=NULL, ...)
u |
Nonexceedance probability |
v |
Nonexceedance probability |
para |
A special parameter |
... |
Additional arguments to pass to the copulas. |
Value(s) for the copula are returned.
The following descriptions list in detail the structure and content of the para
argument:
glue
— The \gamma
gluing parameter;
cop1
— Function of the first copula \mathbf{A}
;
cop2
— Function of the second copula \mathbf{B}
;
para1
— Vector of parameters \Theta_\mathbf{A}
for \mathbf{A}
; and
para2
— Vector of parameters \Theta_\mathbf{B}
for \mathbf{B}
.
W.H. Asquith
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ánchez, J.F.: Springer, Cham, Switzerland, ISBN 978–3–319–64220–9, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/978-3-319-64221-5")}.
COP
, breveCOP
, composite1COP
, composite2COP
, composite3COP
, convexCOP
## Not run:
para <- list(cop1=PLACKETTcop, para1=.2, cop2=GLcop, para2=1.2, glue=0.6)
densityCOPplot(cop=glueCOP, para=para) #
## End(Not run)
## Not run:
# Concerning Nelsen (2006, exam. 3.3, pp. 59-61)
# 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 [G, 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, ...) }
# Demonstrate Nelsen's triangular copula (black dots )
UV <- simCOP(cop=UsersCop, para=0.35, cex=0.5, pch=16)
# Add Erdley's gluing of M() and W() copula (red circles)
para <- list(cop1=M, cop2=W, para1=NA, para2=NA, glue=0.35)
UV <- simCOP(cop=glueCOP, para=para, col=2, ploton=FALSE)
# We see in the plot that the triangular copulas are the same.
# For G = 0.5, Erdley shows Spearman Rho = 2*G-1 = 0, but
# Schweizer-Wolff = G^2 + (G-1)^2 = 0.5, let us check these:
para <- list(cop1=M, cop2=W, para1=NA, para2=NA, glue=0.5)
rhoCOP( cop=glueCOP, para=para) # -2.181726e-17
wolfCOP(cop=glueCOP, para=para) # 0.4999953
# So, rhoCOP() indicates independence, but wolfCOP() indicates
# dependence at the minimum value possible for a triangular copula.
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.