Method for generating vectors of random numbers of nested Archimedean copulas which are child copulas.

1 |

`x` |
an |

`theta0` |
the parameter (vector) of the parent Archimedean copula
which contains |

`V0` |
a |

`...` |
possibly further arguments for the given copula family. |

The generation is done recursively, descending the tree implied by the
nested Archimedean structure. The algorithm is based on a mixture
representation and requires sampling *V01 ~ F01*
given random variates *V0 ~ F0*. Calling
`"rnchild"`

is only intended for experts. The typical call of
this function takes place through `rnacopula()`

.

a list with components

`U` |
a |

`indcol` |
an |

`rnacopula`

, also for the references.
Further, classes `"nacopula"`

and
`"outer_nacopula"`

; see also `onacopula()`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
## Construct a three-dimensional nested Clayton copula with parameters
## chosen such that the Kendall's tau of the respective bivariate margins
## are 0.2 and 0.5.
theta0 <- copClayton@iTau(.2)
theta1 <- copClayton@iTau(.5)
C3 <- onacopula("C", C(theta0, 1, C(theta1, c(2,3))))
## Sample n random variates V0 ~ F0 (a Gamma(1/theta0,1) distribution)
n <- 1000
V0 <- copClayton@V0(n, theta0)
## Given these variates V0, sample the child copula, that is, the bivariate
## nested Clayton copula with parameter theta1
U23 <- rnchild(C3@childCops[[1]], theta0, V0)
## Now build the three-dimensional vectors of random variates by hand
U1 <- copClayton@psi(rexp(n)/V0, theta0)
U <- cbind(U1, U23$U)
## Plot the vectors of random variates from the three-dimensional nested
## Clayton copula
splom2(U)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.