tnagler / VineCopula

Statistical inference of vine copulas
87 stars 32 forks source link

How to set up vine copula model with different margins in vine_dist() and a possible bug in rvinecoplib #60

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi prof. Thomas,

I just wonder how could we set up a vine copula model with different margins in vine_dist() function. I found the following example in rvinecoplib (pdf),

set up vine copula model with Gaussian margins vc <- vine_dist(list(distr = "norm"), pcs, mat)

however, how about different margins types. For example, suppose that I have 4 variables, with four different margins! how could we specify them in vine_dist() function?

I tried this:

VC1 <- vine_dist(list(list(distr = "norm"), list(distr="beta")),pcs, mat) but got an error: Error in vine_dist(list(list(distr = "norm"), list(distr = "beta")), pcs, mat, : marg should have length 1 or dim(structure)[1]

I set up a vine copula model with Gaussian margins, however, I face the following:

VC1$copula 7-dimensional vine copula model ('vinecop_dist') VC1$loglik [1] NA

VC1$npars numeric(0)

I really do not know if this is a possible bug or it is fine.

Thank you.

tnagler commented 5 years ago
  1. This is the wrong repository, issues for rvinecopulib go here: https://github.com/vinecopulib/rvinecopulib/issues

  2. The error message says:

    Error in vine_dist(list(list(distr = "norm"), list(distr = "beta")), pcs, mat, : marg should have length 1 or dim(structure)[1] Since your vine model is 4-dimensional, the margins argument has to be a list of length 1 or 4.