Perform bivariate simulation of random but coupled variables \(V\) from \(U\) through a copula (Nelsen, 2006, p. 32) by inversion of the numerical derivatives of the copula (derCOPinv
, derCOPinv2
). The method is more broadly known as conditional simulation method. An elaborate implementation is available in simCOP
, which unlike simCOPmicro
, has provisions (default) for graphical support. The simCOPmicro
function is intended to be a minimalist version for copula simulation, and such a version is useful for pedagogic purposes including conditional distributions, conditional quantile functions, and copula reflection (see Note and COP
). An extended educational discussion of simulation using the conditional method is available in the Note section of derCOPinv
.
Some definitions are needed. The copula of \((1-U, 1-V)\) is the survival copula (surCOP
) and is defined as
$$\hat{\mathbf{C}}(u,v) = u + v - 1 + \mathbf{C}(1-u, 1-v)\mbox{,}$$
whereas, following the notation of Joe (2014, pp. 271--272), the copula of \((1-U, V)\) is defined as
$$\acute{\mathbf{C}}(u,v) = v - \mathbf{C}(1-u, v)\mbox{, and}$$
the copula of \((U, 1-V)\) is defined as
$$\grave{\mathbf{C}}(u,v) = u - \mathbf{C}(u, 1-v)\mbox{.}$$
Careful consideration of the nomenclature is necessary as confusion with the occurrences of \(1-u\) and \(1-v\) easily conflate meaning. The nomenclature for the survival copula is more elaborately shown under surCOP
. The difficulty is that the bivariate arguments to the survival copula are exceedance probabilities.
For simulation, again following the nomenclature of Joe (2014, p. 272), the conditional distribution functions (numerical derivatives; derCOP
\(\equiv\) \(\mathbf{C}_{2 \mid 1}(v \mid u)\) and derCOP2
\(\equiv\) \(\mathbf{C}_{1 \mid 2}(u \mid v)\)) can be written in terms of \(\mathbf{C}(u \mid v) = \mathbf{C}_{2 \mid 1}(v \mid u)\) as
$$ \hat{\mathbf{C}}_{2 \mid 1}(v \mid u) = 1 - \mathbf{C}_{2 \mid 1}(1-v \mid 1-u)\mbox{,}$$
$$\acute{\mathbf{C}}_{2 \mid 1}(v \mid u) = \mathbf{C}_{2 \mid 1}( v \mid 1-u)\mbox{, and}$$
$$\grave{\mathbf{C}}_{2 \mid 1}(v \mid u) = 1 - \mathbf{C}_{2 \mid 1}(1-v \mid u)\mbox{,}$$
where the respective "surv"
, "acute"
, and "grave"
are inverses (conditional quantile functions; inverses of numerical derivatives; derCOPinv
\(\equiv\) \(\mathbf{C}^{(-1)}_{2 \mid 1}(v \mid u)\) and derCOPinv2
\(\equiv\) \(\mathbf{C}^{(-1)}_{1 \mid 2}(u \mid v)\)) are
$$ \hat{\mathbf{C}}^{(-1)}_{2 \mid 1}(t \mid u) = 1 - \mathbf{C}^{(-1)}_{2 \mid 1}(1-t \mid 1-u)\:\rightarrow\mbox{\ \code{"sur"},}$$
$$\acute{\mathbf{C}}^{(-1)}_{2 \mid 1}(t \mid u) = \mathbf{C}^{(-1)}_{2 \mid 1}( t \mid 1-u)\:\rightarrow\mbox{\ \code{"acute"}, and}$$
$$\grave{\mathbf{C}}^{(-1)}_{2 \mid 1}(t \mid u) = 1 - \mathbf{C}^{(-1)}_{2 \mid 1}(1-t \mid u)\:\rightarrow\mbox{\ \code{"grave"},}$$
where \(t\) is a uniformly distributed variable.
To clarify the seemingly clunky nomenclature---Joe (2014) does not provide “names” for \(\acute{\mathbf{C}}(u,v)\) or \(\grave{\mathbf{C}}(u,v)\)---the following guidance is informative:
\(\mbox{}\quad\mbox{}\)(1) "surv"
or \(\hat{\mathbf{C}}(u,v)\) is a reflection of \(U\) and \(V\) on the horizontal and vertical axes, respectively
\(\mbox{}\quad\mbox{}\)(2) "acute"
or \(\acute{\mathbf{C}}(u,v)\) is a reflection of \(U\) on the horizontal axis, and
\(\mbox{}\quad\mbox{}\)(3) "grave"
or \(\grave{\mathbf{C}}(u,v)\) is a reflection of \(V\) on the verical axis.
The names "acute"
and "grave"
match those used in the Rd-format math typesetting instructions.
simCOPmicro(u, cop=NULL, para=NULL, seed=NULL,
reflect=c("cop", "surv", "acute", "grave",
"1", "2", "3", "4"), ...)
simCOPv(u, cop=NULL, para=NULL,
reflect=c("cop", "surv", "acute", "grave",
"1", "2", "3", "4"), ...)
Simulated value(s) of nonexceedance probability \(v\) are returned based on the nonexceedance probabilities \(u\) in argument u
.
Nonexceedance probability \(u\) in the \(X\) direction. The runif()
function in R can be used to drive conditional simulation using the simCOPmicro
function (see Examples);
A copula function;
Vector of parameters, if needed, to pass to the copula;
The integer seed to pass immediately to set.seed()
and setting it for the simCOPv
version will dispatch through the triple dots down to simCOPmicro
;
The reflection of the copula (see above) and the default "cop"
or "1"
is the usual copula definition. The numbered values correspond, respectively, to the named values; and
Additional arguments to pass should they be needed.
W.H. Asquith
Joe, H., 2014, Dependence modeling with copulas: Boca Raton, CRC Press, 462 p.
Nelsen, R.B., 2006, An introduction to copulas: New York, Springer, 269 p.
simCOP