It might be useful to have a function to check whether a vine (including the array) is valid (like in CopulaModel
, but allowing for truncated vines).
It might be useful to somehow add functionality so that U-V
asymmetric copulas can be used:
U-V
flip for those -- meaning that there's 8 copula families in total. Are the latter 4 really needed?Package should probably be renamed "rvine". Or, perhaps notation should switch to "gvine", or "regvine".
The vignette needs to be improved:
vignette('copsupp')
in R, the vignette appears.fit.rvine()
outputs a different vine array depending on the order of the variables input into the vars
argument. It shouldn't.
qcondrvine()
would be handy to have in some situations.
Problems with RVineCopSelect()
in VineCopula
(may have to write my own version):
BiCopSelect()
) Puts negative parameters on 90- or 270-degree rotated copulas, but those models actually have positive parameters.BiCopSelect()
) Can't seem to fit the BB6 copula properly. See this example:udat <- CopulaModel::rbb6(10000, c(3,3)) lapply(VineCopula::BiCopSelect(1-udat[, 1], udat[, 2], familyset = 28), identity)
A fitting procedure for vines that's similar to that of the marginal should be included. So, parts of the vine might be specified, parts of the marginals might be specified, and maybe even some parameters ought to be shared amongst some edges.
"rvine"
object, such as data and corresponding measures of fit like AIC/BIC?Perhaps a function edge_possibilities(i, j, G, rvine = TRUE)
or something would be useful to see what variables can possibly go in G[i,j]
, based on the parts of G
already specified. This way I can "fill-in" a vine array if need be, but more importantly so that, when building a new layer, I can choose variables so that the result is still a regular vine (so that I can finish coding the fitseq_rvine()
function).
Multivariate integration should be sped up (in, for example, pcondrvine()
). Use gauss quadrature or something (keep in mind the bounds of integration are probably always contained in [0,1]).
fitlayer_cnqr()
should allow for partial specification of parameters.
If you want to partially specify parts of a vine, like in layeropts()
for example, it might be useful to have a function that returns the desired matrix (or whatever) with NULLs and NAs in their appropriate places. Something like specifycop([2,3] = c("frk", "bvncop"))
.
fitrvine_basic()
, and probably many others, throw an error when the data is a data frame (must be matrix). Fix this to allow for data frames.
Speed-up multivariate integration by using a more appropriate method than nested "integrate".
Instead of making flipped copulas by appending "u", "v", and "r", perhaps make functionals like pcopu()
and qcondcopu()
that take a function (like pfrk()
and qcondgum()
) and returns the same type of function, but flipped accordingly. This way, when defining their own, people don't have to make these flipped versions. Also, it makes programming easier.
Make documentation rvine.object()
that describes the "rvine" object and explains how to look at it. Should first look at the purpose of such documentation. For an example, see
rqss.object()
in {quantreg}.
Vectorize pnew()
and others over cpar
:
pnew(u, v, cpar)
should vectorize over cpar if u,v
are not vectors. Vectorizing phiinv()
should accomplish this -- but that involves vectorizing that algorithm for finding inverse. Maybe I should just use Vectorize()
instead.This code results in an error (2016-07-28): summary(rvine(matrix(1)))
Add bibtex citation to the package
When rearranging a vine (with releaf()
, for example), the copulas should also be permutation-reflected where necessary (probably if an upstream variable switches places with a downstream variable, but would need to figure out exactly when to permute which copulas).
pcondrvine() throws an error when the inputted vine is truncated so that the last row of the copula matrix has two copulas (not 1) -- the pcondmat that is input into copreg::rVineTruncCondCDF() also is missing that last row of a single copula, which is why it errors out.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.