rvine: Create an object of class 'rvine'

Description Usage Arguments Value Examples

View source: R/rvine.R

Description

Create an object of class 'rvine'

Usage

1

Arguments

G

G-Vine array

copmat

Upper triangular (nrow(G)-1) x ncol(G) matrix of copula model names. Or, a vector of length 1 if the same copula model applies to all edges.

cparmat

Upper triangular (nrow(G)-1) x ncol(G) matrix of parameters taken by the copulas in copmat. Or, a single vector of the parameter to be applied to the entire vine.

Value

An object of class 'rvine', which is a named list of the arguments.

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
## Empty vine:
rvine(matrix(nrow=0, ncol=0))

## Independence vine:
(rv <- rvine(matrix(4:1, ncol = 4)))
## Take a look at each component of the vine:
summary(rv)

G <- AtoG(CopulaModel::Dvinearray(4))
(rv <- rvine(G, "frk", 2))
summary(rv)
(rv <- rvine(G, "bvtcop", c(0.4, 5)))

G <- AtoG(CopulaModel::Dvinearray(5))
copmat <- makevinemat("gum",
                      c("bvtcop", "frk"),
                      c("mtcj", "frk", "indepcop"),
                      c("bvncop", "joe", "mtcj", "frk"),
                      zerocol = TRUE)
cparmat <- makevinemat(3.1,
                       list(c(0.5, 4), 2.3),
                       list(4.2, 3.5, numeric(0)),
                       c(0.5, 2.2, 2.5, 1.6), zerocol = TRUE)
rv <- rvine(G, copmat, cparmat)
summary(rv)

vincenzocoia/copsupp documentation built on Aug. 23, 2020, 7:37 a.m.