hsloot / rmo

An R package for Marshall--Olkin distributions and copulas.
https://hsloot.github.io/rmo/
GNU General Public License v3.0
5 stars 2 forks source link

[BUG] Methods that use stats::integrate should check whether integration was successful #90

Closed hsloot closed 3 years ago

hsloot commented 3 years ago

Description

Various methods make use of stats::integrate, but do not check whether the integration was successful or handles the error if that is not the case.

hsloot commented 3 years ago

For most of the problematic integrals, problems will probably only be present if difference_order == 1. For this case, we can use the first-order differences directly without problems. Nevertheless, integration errors should still be dealt with.

For some Bernstein Functions, using an alternative integral (e.g. with the Stieltjes density) might be an option.