Description Usage Arguments Details Value Author(s) See Also Examples
This method draws a sample from a given copula for a given contour level respecting the copula density along the contour.
1 | rCopula_y(y, copula, n = 1, n.disc = 100)
|
y |
A vector of contour levels, i.e. y = C(u,v). |
copula |
a copula object that is used |
n |
The number of samples; can only be larger 1 if a single contour level |
n.disc |
An integer giving the approximate number of evaluation points of the contour curve(s) per axis. |
A) The contour curve is evaluated for each value of y
. The length of this contour curve is approximated as piece-wise linear and the copula density along this curve is integrated.
B) Taking am appropriate uniform random number and applying the inverse of the (almost) CDF yields a distance d on the contour curve. Based on the piece-wise linear function, a pair (u,v) is found that represents the above distance d. Depending if the pair lies in the upper or lower triangle, u or v is fixed and qCopula_u
respectively qCopula_v
is applied to find the "exact" random pair on the contour curve. The procedure starting in A is repeated for each value in y
or the procedure starting in B is repeated n
-times if only a single y
is provided.
A matrix of random pairs with as many rows as values in y
or n
if only a single value y
is given.
Benedikt Graeler
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.