0

I found that the rkdevine function, from the package kdevine, is returning constant zero-valued simulations when it shouldn't be the case. The function is meant to simulate from a a kdevine object, which is vine-copula based density estimator

Example of the problem:

#1. Set the data
x <- c(0.5150864, 0.1661704, 0.5138176, 0.5044893, 0.4984769, 0.8359263, 0.4838860, 0.4799104, 0.4800063, 0.5012104)
y <- c(0.02299000, 0.03423000, 0.00649000, 0.01970000, 0.02184000, 0.01053000, 0.02399000, 0.02067000, 0.10918000, 0.04334681)
z <- c(0.13505051, 0.06968379, 0.06484263, 0.08655820, 0.07044886, 0.08455797, 0.06206888, 0.07187104, 0.93282970, 0.07841944)
#2. Create the copula density estimation
k.den <- kdevine(x = cbind(x, y, z), xmin = c(0.01, 0, 0.04), xmax = c(0.99, 2, 2), method = "TLL2nn")
#3. Generate simulations
rkdevine(1, k.den)

The output rkdevine(1, k.den) is c(0, 0, 0), which is obviously mistaken.

It tried looking at the function rkdevine but cannot find the mistake. Earlier versions of the package and/or R used to work.

Edward
22.3k3 gold badges18 silver badges37 bronze badges
asked Jul 16, 2024 at 9:09
3
  • Given that this may be a version-specific problem. Please provide the version of R and kdevine that you use. Type version$version.string for your R version and package_version("kdevine") for the package version. Commented Jul 17, 2024 at 10:01
  • R version 4.3.2, and kdevine version 0.4.5. Commented Jul 17, 2024 at 10:21
  • I've just updated R to version 4.4.1 and still have the same issue, Commented Jul 17, 2024 at 10:37

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.