CDVineMLE: Maximum likelihood estimation of C- and D-vine copula models

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/CDVineMLE.R

Description

This function calculates the MLE of C- or D-vine copula model parameters using sequential estimates as initial values (if not provided).

Usage

1
2
CDVineMLE(data, family, start=NULL, start2=NULL, type, maxit=200,
          max.df=30, max.BB=list(BB1=c(5,6),BB6=c(6,6),BB7=c(5,6),BB8=c(6,1)), ...)

Arguments

data

An N x d data matrix (with uniform margins).

family

A d*(d-1)/2 integer vector of C-/D-vine pair-copula families with values
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)
28 = rotated BB6 copula (90 degrees)
29 = rotated BB7 copula (90 degrees)
30 = rotated BB8 copula (90 degrees)
33 = rotated Clayton copula (270 degrees)
34 = rotated Gumbel copula (270 degrees)
36 = rotated Joe copula (270 degrees)
37 = rotated BB1 copula (270 degrees)
38 = rotated BB6 copula (270 degrees)
39 = rotated BB7 copula (270 degrees)
40 = rotated BB8 copula (270 degrees)

start

A d*(d-1)/2 numeric vector of starting values for C-/D-vine pair-copula parameters (optional; otherwise they are calculated via CDVineSeqEst; default: start = NULL).

start2

A d*(d-1)/2 numeric vector of starting values for second C-/D-vine pair-copula parameters (optional; otherwise they are calculated via CDVineSeqEst; default: start2 = NULL).

type

Type of the vine model:
1 or "CVine" = C-vine
2 or "DVine" = D-vine

maxit

The maximum number of iteration steps (optional; default: maxit = 200).

max.df

Numeric; upper bound for the estimation of the degrees of freedom parameter of the t-copula (default: max.df = 30; for more details see BiCopEst).

max.BB

List; upper bounds for the estimation of the two parameters (in absolute values) of the BB1, BB6, BB7 and BB8 copulas
(default: max.BB = list(BB1=c(5,6),BB6=c(6,6),BB7=c(5,6),BB8=c(6,1))).

...

Additional control parameters for optim.

Value

par

Estimated (first) C-/D-vine pair-copula parameters.

par2

Estimated second C-/D-vine pair-copula parameters for families with two parameters (t, BB1,BB6, BB7, BB8). All other entries are zero.

loglik

Optimized log-likelihood value corresponding to the estimated pair-copula parameters.

convergence

An integer code indicating either successful convergence (convergence = 0) or an error (cp. optim; the CDVineMLE-function uses the "L-BFGS-B" method):
1 = the iteration limit maxit has been reached
51 = a warning from the "L-BFGS-B" method; see component message for further details
52 = an error from the "L-BFGS-B" method; see component message for further details

message

A character string giving any additional information returned by optim, or NULL.

Author(s)

Carlos Almeida, Ulf Schepsmeier

References

Aas, K., C. Czado, A. Frigessi, and H. Bakken (2009). Pair-copula constructions of multiple dependence. Insurance: Mathematics and Economics 44 (2), 182-198.

See Also

CDVineLogLik, CDVineSeqEst

Examples

 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
## Example 1: 4-dimensional D-vine model with Gaussian pair-copulas
data(worldindices)
Data = as.matrix(worldindices)[,1:4]
fam = rep(1,6)

# maximum likelihood estimation
## Not run: 
CDVineMLE(Data,family=fam,type=2,maxit=100)

## End(Not run)

## Example 2: 4-dimensional D-vine model with mixed pair-copulas
fam2 = c(5,1,3,14,3,2)

# sequential estimation
m = CDVineSeqEst(Data,family=fam2,type=2)
m

# calculate the log-likelihood
LogLik0 = CDVineLogLik(Data,fam2,m$par,m$par2,type=2)
LogLik0$loglik

# maximum likelihood estimation
## Not run: 
CDVineMLE(Data,family=fam2,type=2,maxit=5)  # 5 iterations
CDVineMLE(Data,family=fam2,type=2)  # default: 200 iterations

## End(Not run)

Example output

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.

$par
[1] 0.2014844 0.3243304 0.1894926 0.1191447 0.2154987 0.7265817

$par2
[1] 0 0 0 0 0 0

$loglik
[1] 201.1419

$counts
function gradient 
       7        7 

$convergence
[1] 0

$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"

$par
[1] 0.9154534 0.3246330 0.1916378 1.0688747 0.2340853 0.7185443

$par2
[1] 0.000000 0.000000 0.000000 0.000000 0.000000 7.802587

[1] 198.2273
$par
[1] 0.8552650 0.3243652 0.1962937 1.0725591 0.1668017 0.7219322

$par2
[1] 0.000000 0.000000 0.000000 0.000000 0.000000 7.802131

$loglik
[1] 199.0857

$counts
function gradient 
       8        8 

$convergence
[1] 1

$message
[1] "NEW_X"

$par
[1] 0.6492769 0.3077149 0.1822637 1.0705138 0.1478432 0.7254859

$par2
[1] 0.00000 0.00000 0.00000 0.00000 0.00000 7.38417

$loglik
[1] 199.4444

$counts
function gradient 
      43       43 

$convergence
[1] 0

$message
[1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH"

CDVine documentation built on May 2, 2019, 9:28 a.m.