Package ‘CDVine’
October 29, 2015
Type Package
Title Statistical Inference of C- And D-Vine Copulas
Version 1.4
Date 2015-10-29
Author Ulf Schepsmeier, Eike Christian Brechmann
Maintainer Tobias Erhardt
<tobias.erhardt@tum.de>
Depends R (>= 2.11.0)
Imports MASS, mvtnorm, graphics, igraph, stats
Description Functions for statistical inference of canonical vine (C-vine)
and D-vine copulas. Tools for bivariate exploratory data analysis and for bivariate
as well as vine copula selection are provided. Models can be estimated
either sequentially or by joint maximum likelihood estimation.
Sampling algorithms and plotting methods are also included.
Data is assumed to lie in the unit hypercube (so-called copula
data).
License GPL (>= 2)
LazyLoad yes
NeedsCompilation yes
Repository CRAN
Date/Publication 2015-10-29 13:03:16
R topics documented:
CDVine-package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
BiCopCDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
BiCopChiPlot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
BiCopEst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
BiCopGofKendall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
BiCopHfunc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
BiCopIndTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1
2 CDVine-package
BiCopKPlot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
BiCopLambda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
BiCopMetaContour . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
BiCopName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
BiCopPar2TailDep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
BiCopPar2Tau . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
BiCopPDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
BiCopSelect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
BiCopSim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
BiCopTau2Par . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
BiCopVuongClarke . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
CDVineAIC-BIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
CDVineClarkeTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
CDVineCopSelect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
CDVineLogLik . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
CDVineMLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
CDVinePar2Tau . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
CDVineSeqEst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
CDVineSim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
CDVineTreePlot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
CDVineVuongTest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
worldindices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Index 68
CDVine-package Statistical inference of C- and D-vine copulas
Description
Functions for statistical inference of canonical vine (C-vine) and D-vine copulas. Tools for bivariate
exploratory data analysis and for bivariate as well as vine copula selection are provided. Models can
be estimated either sequentially or by joint maximum likelihood estimation. Sampling algorithms
and plotting methods are also included. Data is assumed to lie in the unit hypercube (so-called
copula data).
Details
Package: CDVine
Type: Package
Version: 1.4
Date: 2015-10-29
License: GPL (>=2)
Depends: R (≥ 2.11.0)
Imports: MASS, mvtnorm, graphics, igraph, stats
LazyLoad: yes
CDVine-package 3
Bivariate copula families
In this package several bivariate copula families are included for bivariate analysis as well as for
multivariate analysis using vine copulas. It provides functionality of elliptical (Gaussian and Stu-
dent t) as well as Archimedean (Clayton, Gumbel, Frank, Joe, BB1, BB6, BB7 and BB8) copulas
to cover a large bandwidth of possible dependence structures. For the Archimedean copula families
rotated versions are included to cover negative dependence too. The two parameter BB1, BB6, BB7
and BB8 copulas are however numerically instable for large parameters, in particular, if BB6, BB7
and BB8 copulas are close to the Joe copula which is a boundary case of these three copula families.
In general, the user should be careful with extreme parameter choices.
The following table shows the parameter ranges of bivariate copula families with parameters par
and par2:
Copula family par par2
Gaussian (−1, 1) -
Student t (−1, 1) (2, ∞)
(Survival) Clayton (0, ∞) -
(Survival) Gumbel [1, ∞) -
Frank R\{0} -
(Survival) Joe (1, ∞) -
Rotated Clayton (90 and 270 degrees) (−∞, 0) -
Rotated Gumbel (90 and 270 degrees) (−∞, −1] -
Rotated Joe (90 and 270 degrees) (−∞, −1) -
(Survival) Clayton-Gumbel (BB1) (0, ∞) [1, ∞)
(Survival) Joe-Gumbel (BB6) [1, ∞) [1, ∞)
(Survival) Joe-Clayton (BB7) [1, ∞) (0, ∞)
(Survival) Joe-Frank (BB8) [1, ∞) (0, 1]
Rotated Clayton-Gumbel (90 and 270 degrees) (−∞, 0) −∞, −1]
Rotated Joe-Gumbel (90 and 270 degrees) (−∞, −1] (−∞, −1]
Rotated Joe-Clayton (90 and 270 degrees) (−∞, −1] (−∞, 0)
Rotated Joe-Frank (90 and 270 degrees) (−∞, −1] [−1, 0)
C- and D-vine copula models
When specifying C- and D-vine copula models, one has to select an order of the variables. For a
D-vine the order of the variables in the first tree has to be chosen and for a C-vine the root nodes
for each tree need to be determined. Functions for inference of C- and D-vine copula models in
this package assume that the order of the variables in the data set under investigation exactly cor-
responds to this C- or D-vine order. E.g., in a C-vine the first column of a data set is the first root
node, the second column the second root node, etc. According to this order arguments have to
be provided to functions for C- and D-vine copula inference. After choosing the type of the vine
model, the copula families (family) and parameters (par and par2) have to be specified as vectors
of length d(d − 1)/2, where d is the number of variables. In a C-vine, the entries of this vector
correspond to the following pairs and associated pair-copula terms
(1, 2), (1, 3), (1, 4), ..., (1, d), (2, 3|1), (2, 4|1), ..., (2, d|1), (3, 4|1, 2), (3, 5|1, 2), ..., (3, d|1, 2), ...,
4 CDVine-package
(d − 1, d|1, ..., d − 2).
Similarly, the pairs of a D-vine are denoted in the following order:
(1, 2), (2, 3), (3, 4), ..., (d−1, d), (1, 3|2), (2, 4|3), ..., (d−2, d|d−1), (1, 4|2, 3), (2, 5|3, 4), ..., (d−
3, d|d − 2, d − 1), ..., (1, d|2, ..., d − 1).
Acknowledgment
A first version of this package was based on and inspired by code from Daniel Berg (Norwe-
gian Computing Center; http://www.danielberg.no) provided by personal communication. We
further acknowledge substantial contributions by our working group at Technische Universitaet
Muenchen, in particular by Carlos Almeida and Aleksey Min. In addition, we like to thank Shing
(Eric) Fu, Feng Zhu, Guang (Jack) Yang, and Harry Joe for providing their implementation of the
method by Knight (1966) for efficiently computing the empirical Kendall’s tau. We are especially
grateful to Harry Joe for his contributions to the implementation of the bivariate Archimedean cop-
ulas.
Author(s)
Ulf Schepsmeier, Eike Christian Brechmann <CDVine@ma.tum.de>
References
Aas, K., C. Czado, A. Frigessi, and H. Bakken (2009). Pair-copula constructions of multiple de-
pendence. Insurance: Mathematics and Economics 44 (2), 182-198.
Bedford, T. and R. M. Cooke (2001). Probability density decomposition for conditionally dependent
random variables modeled by vines. Annals of Mathematics and Artificial intelligence 32, 245-268.
Bedford, T. and R. M. Cooke (2002). Vines - a new graphical model for dependent random vari-
ables. Annals of Statistics 30, 1031-1068.
Brechmann, E. C., C. Czado, and K. Aas (2012). Truncated regular vines in high dimensions with
applications to financial data. Canadian Journal of Statistics 40 (1), 68-85.
Brechmann, E. C. and C. Czado (2011). Risk Management with High-Dimensional Vine Copulas:
An Analysis of the Euro Stoxx 50. Submitted for publication. http://mediatum.ub.tum.de/
doc/1079276/1079276.pdf.
Brechmann, E. C. and U. Schepsmeier (2013). Modeling Dependence with C- and D-Vine Copulas:
The R Package CDVine. Journal of Statistical Software, 52 (3), 1-27. http://www.jstatsoft.
org/v52/i03/.
Czado, C., U. Schepsmeier, and A. Min (2012). Maximum likelihood estimation of mixed C-vines
with application to exchange rates. Statistical Modelling, 12 (3), 229-255.
Dissmann, J. F., E. C. Brechmann, C. Czado, and D. Kurowicka (2013). Selecting and estimat-
ing regular vine copulae and application to financial returns. Computational Statistics and Data
Analysis, 59(1), 52-69.
Joe, H. (1996). Families of m-variate distributions with given margins and m(m-1)/2 bivariate
dependence parameters. In L. Rueschendorf, B. Schweizer, and M. D. Taylor (Eds.), Distributions
with fixed marginals and related topics, pp. 120-141. Hayward: Institute of Mathematical Statistics.
BiCopCDF 5
Joe, H. (1997). Multivariate Models and Dependence Concepts. Chapman and Hall, London.
Knight, W. R. (1966). A computer method for calculating Kendall’s tau with ungrouped data.
Journal of the American Statistical Association 61 (314), 436-439.
Kurowicka, D. and R. M. Cooke (2006). Uncertainty Analysis with High Dimensional Dependence
Modelling. Chichester: John Wiley.
Kurowicka, D. and H. Joe (Eds.) (2011). DEPENDENCE MODELING: Vine Copula Handbook.
Singapore: World Scientific Publishing Co.
BiCopCDF Distribution function of a bivariate copula
Description
This function evaluates the cumulative distribution function (CDF) of a given parametric bivariate
copula.
Usage
BiCopCDF(u1, u2, family, par, par2=0)
Arguments
u1,u2 Numeric vectors of equal length with values in [0,1].
family An integer defining the bivariate copula family:
0 = independence copula
1 = Gaussian copula
2 = Student t copula (t-copula)
3 = Clayton copula
4 = Gumbel copula
5 = Frank copula
6 = Joe copula
7 = BB1 copula
8 = BB6 copula
9 = BB7 copula
10 = BB8 copula
13 = rotated Clayton copula (180 degrees; “survival Clayton”)
14 = rotated Gumbel copula (180 degrees; “survival Gumbel”)
16 = rotated Joe copula (180 degrees; “survival Joe”)
17 = rotated BB1 copula (180 degrees; “survival BB1”)
18 = rotated BB6 copula (180 degrees; “survival BB6”)
19 = rotated BB7 copula (180 degrees; “survival BB7”)
20 = rotated BB8 copula (180 degrees; “survival BB8”)
23 = rotated Clayton copula (90 degrees)
24 = rotated Gumbel copula (90 degrees)
26 = rotated Joe copula (90 degrees)
27 = rotated BB1 copula (90 degrees)