This function sequentially estimates the pair-copula parameters of a
d-dimensional R-vine copula model as specified by the corresponding
RVineMatrix()
object.
An N x d data matrix (with uniform margins).
An RVineMatrix()
object including the structure, the
pair-copula families and the pair-copula parameters (if they are known).
indicates the estimation method: either maximum
likelihood estimation (method = "mle"
; default) or inversion of
Kendall's tau (method = "itau"
). For method = "itau"
only
one parameter families and the Student t copula can be used (family = 1,2,3,4,5,6,13,14,16,23,24,26,33,34
or 36
). For the t-copula,
par2
is found by a crude profile likelihood optimization over the
interval (2, 10].
Logical; whether standard errors are estimated (default: se = FALSE
).
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()
).
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))
).
Logical; whether the pairwise estimation progress is printed
(default: progress = FALSE
).
Numerical; weights for each observation (optional).
integer; if cores > 1
, estimation will be parallelized
within each tree (using parallel::parLapply()
). However, the
overhead caused by parallelization is likely to make the function run slower
unless sample size is really large and method = "itau"
.
An RVineMatrix()
object with the sequentially
estimated parameters stored in RVM$par
and RVM$par2
. The object
is augmented by the following information about the fit:
standard errors for the parameter estimates (if
se = TRUE
); note that these are only approximate since they do not
account for the sequential nature of the estimation,
number of observations,
log likelihood (overall and pairwise)
Aikaike's Informaton Criterion (overall and pairwise),
Bayesian's Informaton Criterion (overall and pairwise),
matrix of empirical values of Kendall's tau,
matrix of p-values of the independence test.
The pair-copula parameter estimation is performed tree-wise, i.e., for each
R-vine tree the results from the previous tree(s) are used to calculate the
new copula parameters using BiCopEst()
.
For a comprehensive summary of the fitted model, use
summary(object)
; to see all its contents, use str(object)
.
# define 5-dimensional R-vine tree structure matrix
Matrix <- c(5, 2, 3, 1, 4,
0, 2, 3, 4, 1,
0, 0, 3, 4, 1,
0, 0, 0, 4, 1,
0, 0, 0, 0, 1)
Matrix <- matrix(Matrix, 5, 5)
# define R-vine pair-copula family matrix
family <- c(0, 1, 3, 4, 4,
0, 0, 3, 4, 1,
0, 0, 0, 4, 1,
0, 0, 0, 0, 3,
0, 0, 0, 0, 0)
family <- matrix(family, 5, 5)
# define R-vine pair-copula parameter matrix
par <- c(0, 0.2, 0.9, 1.5, 3.9,
0, 0, 1.1, 1.6, 0.9,
0, 0, 0, 1.9, 0.5,
0, 0, 0, 0, 4.8,
0, 0, 0, 0, 0)
par <- matrix(par, 5, 5)
# define second R-vine pair-copula parameter matrix
par2 <- matrix(0, 5, 5)
# define RVineMatrix object
RVM <- RVineMatrix(Matrix = Matrix, family = family,
par = par, par2 = par2,
names = c("V1", "V2", "V3", "V4", "V5"))
# simulate a sample of size 300 from the R-vine copula model
set.seed(123)
simdata <- RVineSim(300, RVM)
# sequential estimation
summary(RVineSeqEst(simdata, RVM, method = "itau", se = TRUE))
#> tree edge | family cop par par2 | tau utd ltd
#> -------------------------------------------------------------------
#> 1 4,5 | 4 G 4.17 (0.28) - | 0.76 0.82 -
#> 1,2 | 1 N 0.90 (0.01) - | 0.72 - -
#> 1,3 | 1 N 0.49 (0.05) - | 0.33 - -
#> 1,4 | 3 C 4.82 (0.52) - | 0.71 - 0.87
#> 2 1,5;4 | 4 G 1.48 (0.08) - | 0.32 0.40 -
#> 4,2;1 | 4 G 1.62 (0.08) - | 0.38 0.47 -
#> 4,3;1 | 4 G 1.83 (0.11) - | 0.45 0.54 -
#> 3 3,5;1,4 | 3 C 1.10 (0.17) - | 0.35 - 0.53
#> 3,2;4,1 | 3 C 1.33 (0.19) - | 0.40 - 0.59
#> 4 2,5;3,1,4 | 1 N 0.17 (0.06) - | 0.11 - -
#> ---
#> type: R-vine logLik: 1197.32 AIC: -2374.63 BIC: -2337.59
#> ---
#> 1 <-> V1, 2 <-> V2, 3 <-> V3, 4 <-> V4, 5 <-> V5
summary(RVineSeqEst(simdata, RVM, method = "mle", se = TRUE))
#> tree edge | family cop par par2 | tau utd ltd
#> -------------------------------------------------------------------
#> 1 4,5 | 4 G 4.01 (0.19) - | 0.75 0.81 -
#> 1,2 | 1 N 0.90 (0.01) - | 0.71 - -
#> 1,3 | 1 N 0.46 (0.04) - | 0.30 - -
#> 1,4 | 3 C 5.02 (0.31) - | 0.71 - 0.87
#> 2 1,5;4 | 4 G 1.48 (0.07) - | 0.33 0.40 -
#> 4,2;1 | 4 G 1.59 (0.07) - | 0.37 0.46 -
#> 4,3;1 | 4 G 1.87 (0.09) - | 0.47 0.55 -
#> 3 3,5;1,4 | 3 C 0.97 (0.11) - | 0.33 - 0.49
#> 3,2;4,1 | 3 C 1.24 (0.12) - | 0.38 - 0.57
#> 4 2,5;3,1,4 | 1 N 0.18 (0.06) - | 0.11 - -
#> ---
#> type: R-vine logLik: 1198.03 AIC: -2376.06 BIC: -2339.03
#> ---
#> 1 <-> V1, 2 <-> V2, 3 <-> V3, 4 <-> V4, 5 <-> V5