[R] R2Cube integration errors
George Trojan - NOAA Federal
george.trojan at noaa.gov
Thu Jan 26 21:51:26 CET 2017
Why this happens?
> library("R2Cuba")
> f <- function(x) 0
> cuhre(ndim=1, ncomp=1, f)
Iteration 1: 11 integrand evaluations so far
[1] 0 +- 0 chisq 0 (0 df)
Iteration 2: 33 integrand evaluations so far
[1] 0 +- 0 chisq 0 (1 df)
integral: 0 (+-0)
nregions: 2; number of evaluations: 33; probability: 0
> vegas(ndim=1, ncomp=1, f)
Iteration 1: 1000 integrand evaluations so far
[1] 0 +- 7.02518e-18 chisq 0 (0 df)
. . .
Iteration 13: 52000 integrand evaluations so far
[1] 0 +- 2.65413e-18 chisq 0 (12 df)
integral: 0 (+-2.7e-18)
number of evaluations: 52000; probability: 0
failed with message ‘Dimension out of range’
> suave(ndim=1, ncomp=1, f)
. . .
[1] 0 +- 7.02462e-17 chisq 0 (411 df)
integral: 0 (+-7e-17)
nregions: 50; number of evaluations: 50000; probability: 0
failed with message ‘Dimension out of range’
Is this a bug?
George
[[alternative HTML version deleted]]
More information about the R-help
mailing list