[R] numerical integration and 'non-finite function value' error

Adan_Seb dmuluwork at gmail.com
Thu Jun 23 00:46:17 CEST 2011


Dear R users,

I have a question about numerical integration in R.
I am facing the 'non-finite function value' error while integrating the
function
                               xf(x)
using 'integrate'. f(x) is a probability density function and assumed to
follow the three parameter (min = 0) beta distribution for which I have
estimated the parameters. The function is integrated over two ranges, say
(0, a) and (a, Inf). The error 'non-finite function value' happens when I do
the integration for the second range. I have 10 different density functions
for 10 different data series and for some of them replacing Inf by the Max
of f(x) gives me an estimate of the area while for others this doesn't work.

What does the error mean and how can I address it? Is replacing a max for
Inf appropriate?

I really appreciate any clues.




--
View this message in context: http://r.789695.n4.nabble.com/numerical-integration-and-non-finite-function-value-error-tp3618486p3618486.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list