Description Usage Arguments Value Note Examples
If you changed the order of your vine array, this function will convert other matrices associated with the original vine array (such as copula matrix or copula parameter matrix) into new matrices associated with the new vine array.
1 | reformcopmat(mat, Gnew, Gold)
|
mat |
Old matrix to rearrange, such as a copula matrix or copula parameter matrix. Should be upper-triangular, with nrows = truncation number, ncols = vine dimension. |
Anew |
The new vine array index, possibly truncated. Could have
less variables and more truncation than |
Aold |
The old vine array index, possibly truncated. |
A matrix that's possibly subsetted and/or rearranged from mat
.
Make sure that the variables in Aold
and Anew
have the same labels.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Originally...
G <- AtoG(Cvinearray(4))[1:3, ]
copmat <- makeuppertri(c("gum", "gal", "bvtcop",
"bvncop", "frk"), row = 2, col = 4, blanks = "")
cparmat <- makeuppertri.list(c(2, 3, 0.9, 4, 0.1, 0.5),
len = c(1,1,2,1,1), row = 2, col = 4)
## Obtain new vine array by some means:
Gnew <- centervarray(G)
## Get new matrices:
reformcopmat(copmat, Gnew, G)
reformcopmat(cparmat, Gnew, G)
## Try changing the dimension of G
Gnew <- subsetvarray(G[1:2, ], 1:3)
reformcopmat(copmat, Gnew, G)
reformcopmat(cparmat, Gnew, G)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.