Description Usage Arguments Value Author(s) References See Also Examples
This function simulates from given C- and D-vine copula models.
1 |
N |
Number of d-dimensional observations simulated. |
family |
A d*(d-1)/2 integer vector of C-/D-vine pair-copula families with values |
par |
A d*(d-1)/2 vector of pair-copula parameters. |
par2 |
A d*(d-1)/2 vector of second parameters for pair-copula families with two parameters (t, BB1, BB6, BB7, BB8; default: |
type |
Type of the vine model: |
An N
x d matrix of data simulated from the given C- or D-vine copula model.
Carlos Almeida, Ulf Schepsmeier, Eike Brechmann, Jakob Stoeber
Aas, K., C. Czado, A. Frigessi, and H. Bakken (2009). Pair-copula constructions of multiple dependence. Insurance: Mathematics and Economics 44 (2), 182-198.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | ## Example 1: simulate from a 6-dimensional C-vine model
## with Gaussian pair-copulas
d = 6
dd = d*(d-1)/2
fam1 = rep(1,dd)
par1 = c(0.2,0.69,0.73,0.22,-0.09,0.51,0.32,0.01,0.82,0.01,
-0.2,-0.32,-0.19,-0.17,-0.06)
N = 100
U1 = CDVineSim(N,fam1,par1,type=1)
head(U1)
# calculate the log-likelihood
logLik = CDVineLogLik(U1,fam1,par1,type=1)
logLik$loglik
## Example 2: simulate from a 6-dimensional C-vine model
## with Student t pair-copulas each with three degrees of freedom
fam2 = rep(2,dd)
par2 = rep(0.5,dd)
nu2 = rep(3,dd)
U2 = CDVineSim(N,fam2,par2,nu2,type=1)
# calculate the log-likelihood
logLik2 = CDVineLogLik(U2,fam2,par2,nu2,type=1)
logLik2$loglik
## Example 3: simulate from a 6-dimensional D-vine model
## with Student t pair-copulas each with five degrees of freedom
fam3 = rep(2,dd)
par3 = rep(0.4,dd)
nu3 = rep(5,dd)
U3 = CDVineSim(N,fam3,par3,nu3,type=2)
# calculate the log-likelihood
logLik3 = CDVineLogLik(U3,fam3,par3,nu3,type=2)
logLik3$loglik
|
The CDVine package is no longer developed actively.
Please consider using the more general VineCopula package
(see https://CRAN.R-project.org/package=VineCopula),
which extends and improves the functionality of CDVine.
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 0.7490381 0.5025327 0.8972044 0.6678854 0.0520954 0.5811345
[2,] 0.4937799 0.6758178 0.2057871 0.5833563 0.4718454 0.5754951
[3,] 0.8044155 0.6159832 0.5593707 0.2230294 0.4178685 0.6371460
[4,] 0.9253415 0.6181450 0.9252667 0.6979165 0.5013322 0.3194054
[5,] 0.3872614 0.8444397 0.6260970 0.1148200 0.4906736 0.7283768
[6,] 0.5684273 0.9629564 0.6423097 0.8668104 0.6613836 0.9110237
[1] 180.851
[1] 181.8809
[1] 144.2656
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.