[R] Problem with Integrate

Thomas Lumley tlumley at u.washington.edu
Tue Mar 2 16:25:46 CET 2004


On Tue, 2 Mar 2004, Anon. wrote:

> Thomas Lumley wrote:
> > The help page for integrate() says
> >
> >      When integrating over infinite intervals do so explicitly, rather
> >      than just using a large number as the endpoint.  This increases
> >      the chance of a correct answer - any function whose integral over
> >      an infinite interval is finite must be near zero for most of that
> >      interval.
> >
> > That is, if you want an integral from 0 to Inf, do that.
> >
> Sorry, I forgot to put that in my message.  It gives the same error as a
> large value.  I assume it's all a result of the NaN's being returned.
>

In that case I think you need to decide what the NaNs should be and set
them to that.  If they should be 0 then make them 0.

	-thomas




More information about the R-help mailing list