# set up vine copula model
u <- matrix(runif(20 * 10), 20, 10)
vc <- vinecop(u, family = "indep")
# plot
plot(vc, tree = c(1, 2))
plot(vc, edge_labels = "pair")
# extract igraph representation
plt <- plot(vc, edge_labels = "family_tau")
igr_obj <- get("g", plt$plot_env)[[1]]
igr_obj # print object
igraph::E(igr_obj)$name # extract edge labels
# set up another vine copula model
pcs <- lapply(1:3, function(j) # pair-copulas in tree j
lapply(runif(4 - j), function(cor) bicop_dist("gaussian", 0, cor)))
mat <- rvine_matrix_sim(4)
vc <- vinecop_dist(pcs, mat)
# contour plot
contour(vc)
Run the code above in your browser using DataLab