You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear developer,
I encountered some unexpected result when applying this function:
The 2.0 entries are due to the incorrect output "-1" of chi2comb_cdf.
I then checked the case when two chisquared random variables are in the combination, both having dof 1, ncent 0. Whenever the expected probability is smaller than around 0.225, it will output -1 as the result and the errno is 1. For example, chi2comb_cdf(1.25,[ChiSquared(coef=2, ncent=0, dof=1),ChiSquared(coef=3, ncent=0, dof=1)],0), which should output 0.2246805.
However this does not hold for all cases. I have not found any error when either of the dof is not 1. When the number of variables is at least 3, it also works well. As for the non-centrality parameters, error also occurs when the output is small, for example, chi2comb_cdf(5,[ChiSquared(coef=5, ncent=3, dof=1),ChiSquared(coef=3, ncent=0, dof=1)],0), which should be 0.1471154.
Could you please check why it goes wrong?
The text was updated successfully, but these errors were encountered:
It looks like the error category "1" gives a clue for the issue (denoting "1: required accuracy not achieved"). Therefore, if we increase the absolute error tolerance atol from the default 1e-4 to 1e-3 or even 1e-2, the error will be resolved. Probably, we can use a try and error strategy (increase atol gradually).
BTW, thanks Danilo for developing the nice package (and already have considered the potential issue)!
Dear developer,
I encountered some unexpected result when applying this function:
The 2.0 entries are due to the incorrect output "-1" of chi2comb_cdf.
I then checked the case when two chisquared random variables are in the combination, both having dof 1, ncent 0. Whenever the expected probability is smaller than around 0.225, it will output -1 as the result and the errno is 1. For example,
chi2comb_cdf(1.25,[ChiSquared(coef=2, ncent=0, dof=1),ChiSquared(coef=3, ncent=0, dof=1)],0)
, which should output 0.2246805.However this does not hold for all cases. I have not found any error when either of the dof is not 1. When the number of variables is at least 3, it also works well. As for the non-centrality parameters, error also occurs when the output is small, for example,
chi2comb_cdf(5,[ChiSquared(coef=5, ncent=3, dof=1),ChiSquared(coef=3, ncent=0, dof=1)],0)
, which should be 0.1471154.Could you please check why it goes wrong?
The text was updated successfully, but these errors were encountered: