View source: R/RVineCopSelect.R
RVineCopSelect  R Documentation 
This function fits a Rvine copula model to a ddimensional copula data set.
Paircopula families are selected using BiCopSelect()
and
estimated sequentially.
RVineCopSelect(
data,
familyset = NA,
Matrix,
selectioncrit = "AIC",
indeptest = FALSE,
level = 0.05,
trunclevel = NA,
weights = NA,
rotations = TRUE,
se = FALSE,
presel = TRUE,
method = "mle",
cores = 1
)
data 
N x d data matrix (with uniform margins). 
familyset 
integer vector of paircopula families to select from.
The vector has to include at least one
paircopula family that allows for positive and one that allows for negative
dependence. Not listed copula families might be included to better handle
limit cases. If 
Matrix 
lower or upper triangular d x d matrix that defines the Rvine tree structure. 
selectioncrit 
Character indicating the criterion for paircopula
selection. Possible choices: 
indeptest 
Logical; whether a hypothesis test for the independence of

level 
numeric; significance level of the independence test (default:

trunclevel 
integer; level of truncation. 
weights 
Numerical; weights for each observation (optional). 
rotations 
logical; if 
se 
Logical; whether standard errors are estimated (default: 
presel 
Logical; whether to exclude families before fitting based on symmetry properties of the data. Makes the selection about 30\ (on average), but may yield slightly worse results in few special cases. 
method 
indicates the estimation method: either maximum
likelihood estimation ( 
cores 
integer; if 
Rvine copula models with unknown structure can be specified using
RVineStructureSelect()
.
An RVineMatrix()
object with the selected families
(RVM$family
) as well as sequentially
estimated parameters stored in RVM$par
and RVM$par2
. The object
is augmented by the following information about the fit:
se, se2 
standard errors for the parameter estimates (if

nobs 
number of observations, 
logLik, pair.logLik 
log likelihood (overall and pairwise) 
AIC, pair.AIC 
Aikaike's Informaton Criterion (overall and pairwise), 
BIC, pair.BIC 
Bayesian's Informaton Criterion (overall and pairwise), 
emptau 
matrix of empirical values of Kendall's tau, 
p.value.indeptest 
matrix of pvalues of the independence test. 
#'
For a comprehensive summary of the vine copula model, use
summary(object)
; to see all its contents, use str(object)
.
Eike Brechmann, Thomas Nagler
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), 6885.
Dissmann, J. F., E. C. Brechmann, C. Czado, and D. Kurowicka (2013). Selecting and estimating regular vine copulae and application to financial returns. Computational Statistics & Data Analysis, 59 (1), 5269.
RVineMatrix()
,
BiCop()
,
BiCopSelect()
,
plot.RVineMatrix()
,
contour.RVineMatrix()
# define 5dimensional Rvine 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 Rvine paircopula 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 Rvine paircopula 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 Rvine paircopula 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 500 from the Rvine copula model
set.seed(123)
simdata < RVineSim(500, RVM)
## determine the paircopula families and parameters
RVM1 < RVineCopSelect(simdata, familyset = c(1, 3, 4, 5 ,6), Matrix)
## see the object's content or a summary
str(RVM1)
summary(RVM1)
## inspect the fitted model using plots
## Not run: plot(RVM1) # tree structure
contour(RVM1) # contour plots of all paircopulas
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.