tnagler / VineCopula

Statistical inference of vine copulas
88 stars 32 forks source link

Error in uniroot...? #80

Closed dimitris93 closed 3 years ago

dimitris93 commented 3 years ago

This minimal example, gives me the error below

library(VineCopula)

A1 <- c(0.156862745098039, 0.254901960784314, 0.96078431372549, 0.529411764705882, 0.274509803921569, 0.666666666666667, 0.784313725490196, 0.568627450980392, 0.882352941176471, 0.607843137254902, 0.803921568627451, 0.196078431372549, 0.509803921568627, 0.490196078431373, 0.980392156862745, 0.647058823529412, 0.0588235294117647, 0.176470588235294, 0.235294117647059, 0.294117647058824, 0.431372549019608, 0.470588235294118, 0.941176470588235, 0.627450980392157, 0.313725490196078, 0.92156862745098, 0.725490196078431, 0.450980392156863, 0.686274509803922, 0.901960784313726, 0.0784313725490196, 0.333333333333333, 0.705882352941177, 0.549019607843137, 0.862745098039216, 0.823529411764706, 0.764705882352941, 0.843137254901961, 0.352941176470588, 0.372549019607843, 0.0980392156862745, 0.117647058823529, 0.215686274509804, 0.137254901960784, 0.411764705882353, 0.0196078431372549, 0.0392156862745098, 0.745098039215686, 0.588235294117647, 0.392156862745098)
A2<- c(0.156862745098039, 0.254901960784314, 0.941176470588235, 0.529411764705882, 0.274509803921569, 0.745098039215686, 0.784313725490196, 0.568627450980392, 0.882352941176471, 0.607843137254902, 0.803921568627451, 0.196078431372549, 0.509803921568627, 0.470588235294118, 0.980392156862745, 0.647058823529412, 0.0588235294117647, 0.176470588235294, 0.215686274509804, 0.294117647058824, 0.450980392156863, 0.490196078431373, 0.92156862745098, 0.627450980392157, 0.313725490196078, 0.96078431372549, 0.705882352941177, 0.372549019607843, 0.666666666666667, 0.901960784313726, 0.0784313725490196, 0.352941176470588, 0.686274509803922, 0.549019607843137, 0.843137254901961, 0.823529411764706, 0.764705882352941, 0.862745098039216, 0.392156862745098, 0.333333333333333, 0.0980392156862745, 0.117647058823529, 0.235294117647059, 0.137254901960784, 0.431372549019608, 0.0196078431372549, 0.0392156862745098, 0.725490196078431, 0.588235294117647, 0.411764705882353)

C1 <- BiCopSelect(A1, A2, selectioncrit = "AIC")

Error:

Error in uniroot(function(x) tau - frankTau(x), lower = 0 + .Machine$double.eps^0.5,  : 
  f() values at end points not of opposite sign

Any idea what is happening and how to fix it?

tnagler commented 3 years ago

Seems to be related to #78, which was just solved by #79. Can you try again with the new version?

remotes::install_github("tnagler/VineCopula")
dimitris93 commented 3 years ago

#79 did fix the issue I described above. It does seem to work properly now. Thank you.