Description Usage Arguments Details Value Note Examples
Use this function to construct a vine array, copula matrix, or copula parameter matrix. Do so by specifying layers in the vine (columns in the matrix) or trees in the vine (rows in the matrix). A full matrix need not be constructed.
1 | makevinemat(..., bylayer = TRUE, zerocol = FALSE)
|
... |
Vectors or lists to construct the matrix with. |
bylayer |
|
zerocol |
Should there be an "empty" column appended to the left of the outputted matrix? Useful for making copula matrices, for example. |
If you want an entry of the matrix to contain something other than a vector
of length 1 (for example, copula parameters of dimension different from 1),
specify the entries within a list in ...
.
"Empty" entries are either list(NULL)
if the matrix entries aren't
all vectors of length 1, 0
if the matrix is numeric, or ""
if the matrix is of type "character".
If bylayer
is TRUE
, the returned matrix places
entries in "..." as
columns from left to right, as if building a vine by adding layers.
Empty portions of the columns are put at the
bottom of the column.
If bylayer
is FALSE
, the returned matrix places
entries in "..." as
rows from top to bottom, as if building a vine by specifying tree depths.
Empty portions of the rows are put to the
left of the row.
If you intend to build a vine array with this function, you'll get
"tree 0" (the variable nodes) in row 1, instead of the diagonal. To convert
to the "traditional" form, use contoA
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Vine array
makevinemat(1, c(2,1), c(3, 1, 2), c(4, 1, 2, 3))
makevinemat(1, c(2,1), c(3, 1, 2), c(4, 1), c(5, 1:4))
makevinemat()
## Two layers of a vine array
makevinemat(c(4,1), c(5, 1:4))
## Copula Matrix
makevinemat(c("gum", "gum", "bvtcop"), c("frk", "", "joe"),
bylayer = FALSE, zerocol = TRUE)
makevinemat(zerocol = TRUE)
## Copula Parameter Matrix
makevinemat(list(2.4, 3.8, c(0.6, 7)), c(4.5, 2.3), bylayer=F, zerocol=T)
makevinemat(1:3, 4:5, bylayer=F, zerocol=T)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.